pandora-kernel.git
10 years agoMerge branch 'pm-runtime'
Rafael J. Wysocki [Tue, 1 Apr 2014 20:10:15 +0000 (22:10 +0200)]
Merge branch 'pm-runtime'

* pm-runtime:
  PM / Runtime: Spelling s/competing/completing/
  PM / Runtime: s/foo_process_requests/foo_process_next_request/
  PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone
  PM / Runtime: Correct documented return values for generic PM callbacks
  PM / Runtime: Split line longer than 80 characters
  PM / Runtime: dev_pm_info.runtime_error is signed

10 years agoMerge branch 'pm-cpufreq'
Rafael J. Wysocki [Tue, 1 Apr 2014 20:10:08 +0000 (22:10 +0200)]
Merge branch 'pm-cpufreq'

* pm-cpufreq:
  cpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static
  cpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}
  cpufreq: Make sure frequency transitions are serialized
  intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop
  cpufreq: resume drivers before enabling governors

10 years agoMerge branches 'acpi-processor' and 'pnp'
Rafael J. Wysocki [Tue, 1 Apr 2014 20:09:50 +0000 (22:09 +0200)]
Merge branches 'acpi-processor' and 'pnp'

* acpi-processor:
  Revert "ACPI / processor: Make it possible to get APIC ID via GIC"

* pnp:
  PNP: remove deprecated IRQF_DISABLED

10 years agoMerge branch 'acpica'
Rafael J. Wysocki [Tue, 1 Apr 2014 20:09:26 +0000 (22:09 +0200)]
Merge branch 'acpica'

* acpica:
  ACPICA: Enable auto-serialization as a default kernel behavior.
  ACPICA: Ignore sync_level for methods that have been auto-serialized.
  ACPICA: Add additional named objects for the auto-serialize method scan.
  ACPICA: Add auto-serialization support for ill-behaved control methods.
  ACPICA: Remove global option to serialize all control methods.

10 years agocpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static
Viresh Kumar [Mon, 24 Mar 2014 08:05:46 +0000 (13:35 +0530)]
cpufreq: Make cpufreq_notify_transition & cpufreq_notify_post_transition static

cpufreq_notify_transition() and cpufreq_notify_post_transition() shouldn't be
called directly by cpufreq drivers anymore and so these should be marked static.

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}
Viresh Kumar [Mon, 24 Mar 2014 08:05:45 +0000 (13:35 +0530)]
cpufreq: Convert existing drivers to use cpufreq_freq_transition_{begin|end}

CPUFreq core has new infrastructure that would guarantee serialized calls to
target() or target_index() callbacks. These are called
cpufreq_freq_transition_begin() and cpufreq_freq_transition_end().

This patch converts existing drivers to use these new set of routines.

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Make sure frequency transitions are serialized
Srivatsa S. Bhat [Mon, 24 Mar 2014 08:05:44 +0000 (13:35 +0530)]
cpufreq: Make sure frequency transitions are serialized

Whenever we change the frequency of a CPU, we call the PRECHANGE and POSTCHANGE
notifiers. They must be serialized, i.e. PRECHANGE and POSTCHANGE notifiers
should strictly alternate, thereby preventing two different sets of PRECHANGE or
POSTCHANGE notifiers from interleaving arbitrarily.

The following examples illustrate why this is important:

Scenario 1:
-----------
A thread reading the value of cpuinfo_cur_freq, will call
__cpufreq_cpu_get()->cpufreq_out_of_sync()->cpufreq_notify_transition()

The ondemand governor can decide to change the frequency of the CPU at the same
time and hence it can end up sending the notifications via ->target().

If the notifiers are not serialized, the following sequence can occur:
- PRECHANGE Notification for freq A (from cpuinfo_cur_freq)
- PRECHANGE Notification for freq B (from target())
- Freq changed by target() to B
- POSTCHANGE Notification for freq B
- POSTCHANGE Notification for freq A

We can see from the above that the last POSTCHANGE Notification happens for freq
A but the hardware is set to run at freq B.

Where would we break then?: adjust_jiffies() in cpufreq.c & cpufreq_callback()
in arch/arm/kernel/smp.c (which also adjusts the jiffies). All the
loops_per_jiffy calculations will get messed up.

Scenario 2:
-----------
The governor calls __cpufreq_driver_target() to change the frequency. At the
same time, if we change scaling_{min|max}_freq from sysfs, it will end up
calling the governor's CPUFREQ_GOV_LIMITS notification, which will also call
__cpufreq_driver_target(). And hence we end up issuing concurrent calls to
->target().

Typically, platforms have the following logic in their ->target() routines:
(Eg: cpufreq-cpu0, omap, exynos, etc)

A. If new freq is more than old: Increase voltage
B. Change freq
C. If new freq is less than old: decrease voltage

Now, if the two concurrent calls to ->target() are X and Y, where X is trying to
increase the freq and Y is trying to decrease it, we get the following race
condition:

X.A: voltage gets increased for larger freq
Y.A: nothing happens
Y.B: freq gets decreased
Y.C: voltage gets decreased
X.B: freq gets increased
X.C: nothing happens

Thus we can end up setting a freq which is not supported by the voltage we have
set. That will probably make the clock to the CPU unstable and the system might
not work properly anymore.

This patch introduces a set of synchronization primitives to serialize frequency
transitions, which are to be used as shown below:

cpufreq_freq_transition_begin();

//Perform the frequency change

cpufreq_freq_transition_end();

The _begin() call sends the PRECHANGE notification whereas the _end() call sends
the POSTCHANGE notification. Also, all the necessary synchronization is handled
within these calls. In particular, even drivers which set the ASYNC_NOTIFICATION
flag can also use these APIs for performing frequency transitions (ie., you can
call _begin() from one task, and call the corresponding _end() from a different
task).

The actual synchronization underneath is not that complicated:

The key challenge is to allow drivers to begin the transition from one thread
and end it in a completely different thread (this is to enable drivers that do
asynchronous POSTCHANGE notification from bottom-halves, to also use the same
interface).

To achieve this, a 'transition_ongoing' flag, a 'transition_lock' spinlock and a
wait-queue are added per-policy. The flag and the wait-queue are used in
conjunction to create an "uninterrupted flow" from _begin() to _end(). The
spinlock is used to ensure that only one such "flow" is in flight at any given
time. Put together, this provides us all the necessary synchronization.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agointel_pstate: Use del_timer_sync in intel_pstate_cpu_stop
Dirk Brandewie [Mon, 24 Mar 2014 14:41:29 +0000 (07:41 -0700)]
intel_pstate: Use del_timer_sync in intel_pstate_cpu_stop

Ensure that no timer callback is running since we are about to free
the timer structure.  We cannot guarantee that the call back is called
on the CPU where the timer is running.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: resume drivers before enabling governors
Viresh Kumar [Mon, 24 Mar 2014 07:00:29 +0000 (12:30 +0530)]
cpufreq: resume drivers before enabling governors

During suspend, we first stop governors and then suspend cpufreq drivers and
resume must be exactly opposite of that. i.e. resume drivers first and then
start governors.

But the current code in resume enables governors first and then resume drivers.
Fix it be changing code sequence there.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / Runtime: Spelling s/competing/completing/
Geert Uytterhoeven [Mon, 24 Mar 2014 20:37:03 +0000 (21:37 +0100)]
PM / Runtime: Spelling s/competing/completing/

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / Runtime: s/foo_process_requests/foo_process_next_request/
Geert Uytterhoeven [Mon, 24 Mar 2014 20:31:31 +0000 (21:31 +0100)]
PM / Runtime: s/foo_process_requests/foo_process_next_request/

The example uses foo_process_next_request() everywhere else.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / Runtime: GENERIC_SUBSYS_PM_OPS is gone
Geert Uytterhoeven [Mon, 24 Mar 2014 20:31:30 +0000 (21:31 +0100)]
PM / Runtime: GENERIC_SUBSYS_PM_OPS is gone

Update the documentation for the removal of GENERIC_SUBSYS_PM_OPS in commit
90363ddf0a1a4dccfbb8d0c10b8f488bc7fa69f8 ("PM: Drop generic_subsys_pm_ops")

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / Runtime: Correct documented return values for generic PM callbacks
Geert Uytterhoeven [Mon, 24 Mar 2014 20:31:29 +0000 (21:31 +0100)]
PM / Runtime: Correct documented return values for generic PM callbacks

As of commit 05aa55dddb9ee4045c320661068bea78dad6a6e5 ("PM / Runtime:
Lenient generic runtime pm callbacks"), the generic power management
callbacks pm_generic_runtime_suspend() and pm_generic_runtime_resume()
return 0, not -EINVAL, if the device doesn't provide its own callbacks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / Runtime: Split line longer than 80 characters
Geert Uytterhoeven [Mon, 24 Mar 2014 20:31:28 +0000 (21:31 +0100)]
PM / Runtime: Split line longer than 80 characters

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / Runtime: dev_pm_info.runtime_error is signed
Geert Uytterhoeven [Mon, 24 Mar 2014 20:31:27 +0000 (21:31 +0100)]
PM / Runtime: dev_pm_info.runtime_error is signed

dev_pm_info.runtime_error has always been a signed int, to store a signed
error code. Correct the documentation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoRevert "ACPI / processor: Make it possible to get APIC ID via GIC"
Hanjun Guo [Wed, 26 Mar 2014 00:36:23 +0000 (08:36 +0800)]
Revert "ACPI / processor: Make it possible to get APIC ID via GIC"

Revert commit df86f5df79d8 (ACPI / processor: Make it possible to get
APIC ID via GIC).

APIC ID refers the hardware ID of the CPU, which means MPIDR on
ARM/ARM64, but in ACPI 5.0, GIC ID feild in GIC structure have
no explicit definition and may not refer to the MPIDR.

Commit df86f5df79d8 assumed that gic->gic_id as MPIDR which may not be
the case, so revert it until the explicit definition of GIC structure
is ready.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Enable auto-serialization as a default kernel behavior.
Lv Zheng [Mon, 24 Mar 2014 06:49:22 +0000 (14:49 +0800)]
ACPICA: Enable auto-serialization as a default kernel behavior.

The previous commit "ACPICA: Add auto-serialization support for ill-behaved
control methods" introduced the auto-serialization facility as a workaround
that can be enabled by "acpi_auto_serialize":

This feature marks control methods that create named objects as "serialized"
to avoid unwanted AE_ALREADY_EXISTS control method evaluation failures.

Enable method auto-serialization as the default kernel behavior.  The new kernel
parameter is also changed from "acpi_auto_serialize" to "acpi_no_auto_serialize"
to reflect the default behavior.

References: https://bugzilla.kernel.org/show_bug.cgi?id=52191
References: http://www.spinics.net/lists/linux-acpi/msg49496.html
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Ignore sync_level for methods that have been auto-serialized.
Bob Moore [Mon, 24 Mar 2014 06:49:13 +0000 (14:49 +0800)]
ACPICA: Ignore sync_level for methods that have been auto-serialized.

Cannot use a sync_level for methods that have been serialized at load-time
or runtime because this may interfere with any existing use of sync_levels
within the ASL code. So, we simply ignore the sync_level for these methods,
thus preserving any existing sync_level priorities. Note, the use of
sync_levels is actually rather rare within BIOS ASL code.

References: http://www.spinics.net/lists/linux-acpi/msg49496.html
Reported-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Reported-by: Sabrina Dubroka <sd@queasysnail.net>
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 additional named objects for the auto-serialize method scan.
Lv Zheng [Mon, 24 Mar 2014 06:49:07 +0000 (14:49 +0800)]
ACPICA: Add additional named objects for the auto-serialize method scan.

This change adds some additional opcodes that are detected and will
cause a method to be auto-serialized. These opcodes are the various
CreateXField and the FieldUnit opcodes. Lv Zheng.

References: https://bugzilla.kernel.org/show_bug.cgi?id=52191
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 auto-serialization support for ill-behaved control methods.
Bob Moore [Mon, 24 Mar 2014 06:49:00 +0000 (14:49 +0800)]
ACPICA: Add auto-serialization support for ill-behaved control methods.

This change adds support to automatically mark a control method as
"serialized" if the method creates any named objects. This will
positively prevent the method from being entered by more than one
thread and thus preventing a possible abort when an attempt is
made to create an object twice.

Implemented by parsing all non-serialize control methods at table
load time.

This feature is disabled by default and this patch also adds a new
Linux kernel parameter "acpi_auto_serialize" to allow this feature
to be turned on for a specific boot.

References: https://bugzilla.kernel.org/show_bug.cgi?id=52191
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: Remove global option to serialize all control methods.
Lv Zheng [Mon, 24 Mar 2014 06:48:45 +0000 (14:48 +0800)]
ACPICA: Remove global option to serialize all control methods.

According to the reports, the "acpi_serialize" mechanism is broken as:

 A. The parallel method calls can still happen when the interpreter lock is
    released under the following conditions:
    1. External callbacks are invoked, for example, by the region handlers,
       the exception handlers, etc.;
    2. Module level execution is performed when Load/LoadTable opcodes are
       executed, and
    3. The _REG control methods are invoked to complete the region
       registrations.
 B. For the following situations, the interpreter lock need to be released
    even for a serialized method while currently, the lock-releasing
    operation is marked as a no-op by
    acpi_ex_relinquish/reacquire_interpreter() when this mechanism is
    enabled:
    1. Wait opcode is executed,
    2. Acquire opcode is executed, and
    3. Sleep opcode is executed.

This patch removes this mechanism and the internal
acpi_ex_relinquish/reacquire_interpreter() APIs.  Lv Zheng.

References: https://bugzilla.kernel.org/show_bug.cgi?id=52191
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 agoMerge branch 'pm-devfreq'
Rafael J. Wysocki [Fri, 21 Mar 2014 22:08:35 +0000 (23:08 +0100)]
Merge branch 'pm-devfreq'

* pm-devfreq:
  PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs

10 years agoMerge branch 'for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfre...
Rafael J. Wysocki [Fri, 21 Mar 2014 21:54:25 +0000 (22:54 +0100)]
Merge branch 'for-rafael' of git://git./linux/kernel/git/mzx/devfreq into pm-devfreq

Pull devfreq fix for 3.15-rc1 from MyungJoo Ham.

* 'for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq:
  PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs

10 years agoMerge branch 'acpi-processor'
Rafael J. Wysocki [Fri, 21 Mar 2014 15:53:28 +0000 (16:53 +0100)]
Merge branch 'acpi-processor'

* acpi-processor:
  ACPI: Move BAD_MADT_ENTRY() to linux/acpi.h
  ACPI / processor: Make it possible to get APIC ID via GIC
  ACPI / processor: Build idle_boot_override on x86 and ia64
  ACPI / processor: Use ACPI_PROCESSOR_DEVICE_HID instead of "ACPI0007"
  ACPI / processor: Fix acpi_processor_eval_pdc() return value type

10 years agoPM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs
Saravana Kannan [Fri, 28 Feb 2014 03:38:57 +0000 (19:38 -0800)]
PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs

The current devfreq_update_status() has the following bugs:
- If previous frequency doesn't have a valid level, it does an out of bounds
  access into the trans_table and causes memory corruption.
- When the new frequency doesn't have a valid level, the time spent in the
  new frequency is counted towards the next valid frequency switch instead of
  being ignored.
- The time spent on the previous frequency is added to the new frequency's
  stats instead of the previous frequency's stats.

This patch fixes all of this.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
10 years agoPNP: remove deprecated IRQF_DISABLED
Michael Opdenacker [Fri, 21 Mar 2014 00:10:28 +0000 (01:10 +0100)]
PNP: remove deprecated IRQF_DISABLED

This patch removes the use of the IRQF_DISABLED flag
from drivers/pnp/resource.c

It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'pm-cpufreq'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:26:12 +0000 (13:26 +0100)]
Merge branch 'pm-cpufreq'

* pm-cpufreq: (30 commits)
  intel_pstate: Set core to min P state during core offline
  cpufreq: Add stop CPU callback to cpufreq_driver interface
  cpufreq: Remove unnecessary braces
  cpufreq: Fix checkpatch errors and warnings
  cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs
  cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE}
  cpufreq: Do not allow ->setpolicy drivers to provide ->target
  cpufreq: arm_big_little: set 'physical_cluster' for each CPU
  cpufreq: arm_big_little: make vexpress driver depend on bL core driver
  cpufreq: SPEAr: Instantiate as platform_driver
  cpufreq: Remove unnecessary variable/parameter 'frozen'
  cpufreq: Remove cpufreq_generic_exit()
  cpufreq: add 'freq_table' in struct cpufreq_policy
  cpufreq: Reformat printk() statements
  cpufreq: Tegra: Use cpufreq_generic_suspend()
  cpufreq: s5pv210: Use cpufreq_generic_suspend()
  cpufreq: exynos: Use cpufreq_generic_suspend()
  cpufreq: Implement cpufreq_generic_suspend()
  cpufreq: suspend governors on system suspend/hibernate
  cpufreq: move call to __find_governor() to cpufreq_init_policy()
  ...

10 years agoMerge branch 'pm-cpuidle'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:26:05 +0000 (13:26 +0100)]
Merge branch 'pm-cpuidle'

* pm-cpuidle:
  cpuidle: delay enabling interrupts until all coupled CPUs leave idle
  cpuidle: poll state can measure residency
  cpuidle: Move perf multiplier calculation out of the selection loop
  cpuidle: Do not substract exit latency from assumed sleep length
  cpuidle: Ensure menu coefficients stay within domain
  cpuidle: Use actual state latency in menu governor
  cpuidle: rename expected_us to next_timer_us in menu governor

10 years agoMerge branches 'pm-runtime' and 'pm-sleep'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:25:54 +0000 (13:25 +0100)]
Merge branches 'pm-runtime' and 'pm-sleep'

* pm-runtime:
  PM / Runtime: Update runtime_idle() documentation for return value meaning

* pm-sleep:
  PM / sleep: Correct whitespace errors in <linux/pm.h>
  PM: Add missing "freeze" state
  PM / Hibernate: Spelling s/anonymouns/anonymous/
  PM / Runtime: Add missing "it" in comment
  PM / suspend: Remove unnecessary !!
  PCI / PM: Resume runtime-suspended devices later during system suspend
  ACPI / PM: Resume runtime-suspended devices later during system suspend
  PM / sleep: Set pm_generic functions to NULL for !CONFIG_PM_SLEEP
  PM: fix typo in comment
  PM / hibernate: use name_to_dev_t to parse resume
  PM / wakeup: Include appropriate header file in kernel/power/wakelock.c
  PM / sleep: Move prototype declaration to header file kernel/power/power.h
  PM / sleep: Asynchronous threads for suspend_late
  PM / sleep: Asynchronous threads for suspend_noirq
  PM / sleep: Asynchronous threads for resume_early
  PM / sleep: Asynchronous threads for resume_noirq
  PM / sleep: Two flags for async suspend_noirq and suspend_late

10 years agoMerge branches 'pm-qos', 'pm-domains' and 'pm-drivers'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:25:36 +0000 (13:25 +0100)]
Merge branches 'pm-qos', 'pm-domains' and 'pm-drivers'

* pm-qos:
  PM / QoS: Add type to dev_pm_qos_add_ancestor_request() arguments
  ACPI / LPSS: Support for device latency tolerance PM QoS
  ACPI / scan: Add bind/unbind callbacks to struct acpi_scan_handler
  PM / QoS: Introcuce latency tolerance device PM QoS type
  PM / QoS: Add no_constraints_value field to struct pm_qos_constraints
  PM / QoS: Rename device resume latency QoS items

* pm-domains:
  PM / domains: Turn latency warning into debug message

* pm-drivers:
  PM: Add pm_runtime_suspend|resume_force functions
  PM / runtime: Fetch runtime PM callbacks using a macro

10 years agoMerge branches 'misc' and 'powercap'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:25:16 +0000 (13:25 +0100)]
Merge branches 'misc' and 'powercap'

* misc:
  MAINTAINERS: Reorder maintainer addresses for PM and ACPI

* powercap:
  powercap / intel_rapl: spell out SoC names
  powercap / intel_rapl: relax sanity check on energy counters

10 years agoMerge branch 'acpica'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:25:02 +0000 (13:25 +0100)]
Merge branch 'acpica'

* acpica: (29 commits)
  ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)."
  ACPICA: Update version to 20140214.
  ACPICA: Prevent infinite loops when traversing corrupted lists.
  ACPICA: Debugger: Add missing objects; Traverse linked lists
  ACPICA: Add text: ACPICA policy for new _OSI strings. No functional change.
  ACPICA: Update for _PRP predefined name.
  ACPICA: Cleanup/improve global variable declarations.
  ACPICA: Comment update - no functional change.
  ACPICA: Do not abort _PRT repair on a single subpackage failure.
  ACPICA: Harden _PRT repair code; check for minimum package length.
  ACPICA: Restore code that repairs NULL package elements in return values.
  ACPICA: Properly handle NULL entries in _PRT return packages.
  ACPICA: Update conditional compilation flags for resource dump functions.
  ACPICA: Predefined names: Add support for the _PRP method.
  ACPICA: Headers: Deploy #pragma pack (push) and (pop).
  ACPICA: Add boot option to disable auto return object repair
  ACPICA: acpidump: Remove integer types translation protection.
  ACPICA: acpidump: Add sparse declarators support.
  ACPICA: Add "Windows 2013" string to _OSI support.
  ACPICA: Update version to 20140114.
  ...

10 years agoMerge branches 'acpi-battery' and 'acpi-video'
Rafael J. Wysocki [Thu, 20 Mar 2014 12:21:44 +0000 (13:21 +0100)]
Merge branches 'acpi-battery' and 'acpi-video'

* acpi-battery:
  ACPI / AC: recheck adapter status upon battery status changes
  ACPI / battery: call ACPI notifier chain in acpi_battery_notify
  ACPI / battery: move some ACPI_BATTERY_* definitions to header

* acpi-video:
  video / output: Drop display output class support
  fujitsu-laptop: Drop unneeded include
  acer-wmi: Stop selecting VIDEO_OUTPUT_CONTROL
  ACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL
  ACPI / video: fix ACPI_VIDEO dependencies

10 years agoMerge branches 'acpi-cleanup', 'acpi-thermal', 'acpi-pci', 'acpi-lpss' and 'acpi...
Rafael J. Wysocki [Thu, 20 Mar 2014 12:20:47 +0000 (13:20 +0100)]
Merge branches 'acpi-cleanup', 'acpi-thermal', 'acpi-pci', 'acpi-lpss' and 'acpi-button'

* acpi-cleanup:
  ACPI: Remove duplicate definitions of PREFIX
  ACPI / tables: Replace printk with pr_*

* acpi-thermal:
  ACPI / thermal: make acpi_thermal_check asynchronous on resume

* acpi-pci:
  ACPI / PCI: Do not call ISA-specific code if ISA is not supported

* acpi-lpss:
  ACPI / LPSS: Add Intel BayTrail ACPI mode PWM

* acpi-button:
  ACPI / button: Add ACPI Button event via netlink routine

10 years agoPM / sleep: Correct whitespace errors in <linux/pm.h>
Geert Uytterhoeven [Mon, 17 Mar 2014 20:26:10 +0000 (21:26 +0100)]
PM / sleep: Correct whitespace errors in <linux/pm.h>

rjw> Why exactly are they errors?
Geert> checkpatch.pl says: "WARNING: please, no space before tabs",
       Vim (with "let c_space_errors=1") shows them in red.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agointel_pstate: Set core to min P state during core offline
Dirk Brandewie [Wed, 19 Mar 2014 15:45:54 +0000 (08:45 -0700)]
intel_pstate: Set core to min P state during core offline

Change to use the new ->stop_cpu() callback to do clean up during CPU
hotplug. The requested P state for an offline core will be used by the
hardware coordination function to select the package P state. If the
core is under load when it is offlined it will fix the package P state
floor to the requested P state of offline core.

Reported-by: Patrick Marlier <patrick.marlier@gmail.com>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Add stop CPU callback to cpufreq_driver interface
Dirk Brandewie [Wed, 19 Mar 2014 15:45:53 +0000 (08:45 -0700)]
cpufreq: Add stop CPU callback to cpufreq_driver interface

This callback allows the driver to do clean up before the CPU is
completely down and its state cannot be modified.  This is used
by the intel_pstate driver to reduce the requested P state prior to
the core going away.  This is required because the requested P state
of the offline core is used to select the package P state. This
effectively sets the floor package P state to the requested P state on
the offline core.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
[rjw: Minor modifications]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Remove unnecessary braces
Stratos Karafotis [Wed, 19 Mar 2014 23:25:13 +0000 (01:25 +0200)]
cpufreq: Remove unnecessary braces

Remove unnecessary braces from a single statement.

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 agocpufreq: Fix checkpatch errors and warnings
Stratos Karafotis [Wed, 19 Mar 2014 21:29:17 +0000 (23:29 +0200)]
cpufreq: Fix checkpatch errors and warnings

Fix 2 checkpatch errors about using assignment in if condition,
1 checkpatch error about a required space after comma
and 3 warnings about line over 80 characters.

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 agocpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs
Zhuoyu Zhang [Tue, 18 Mar 2014 05:41:25 +0000 (13:41 +0800)]
cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs

According to the data provided by HW Team, at least 12 internal platform
clock cycles are required to stabilize a DFS clock switch on FSL e500mc Socs.
This patch replaces the CPUFREQ_ETERNAL with appropriate HW clock transition
latency to make DFS governors work normally on Freescale e500mc boards.

Signed-off-by: Zhuoyu Zhang <Zhuoyu.Zhang@freescale.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMAINTAINERS: Reorder maintainer addresses for PM and ACPI
Rafael J. Wysocki [Thu, 20 Mar 2014 02:34:47 +0000 (03:34 +0100)]
MAINTAINERS: Reorder maintainer addresses for PM and ACPI

For a few subsystems I am the person who actually applies patches
and people don't CC me on patch submissions, because my address is
not the first one in the given MAINTAINERS item.

Reorder PM and ACPI maintainer addresses in MAINTAINERS to make
the probability of that a bit smaller.

Signed-off-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
10 years agoPM / Runtime: Update runtime_idle() documentation for return value meaning
Geert Uytterhoeven [Mon, 17 Mar 2014 20:26:11 +0000 (21:26 +0100)]
PM / Runtime: Update runtime_idle() documentation for return value meaning

As of commit 45f0a85c8258 ('PM / Runtime: Rework the "runtime idle"
helper routine'), the return value of ->runtime_idle() is no longer
ignored by the PM core, but used to decide whether to suspend the
device or not.

Update the documentation to match the code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agovideo / output: Drop display output class support
Jean Delvare [Mon, 17 Mar 2014 14:49:10 +0000 (15:49 +0100)]
video / output: Drop display output class support

It was only ever used by the ACPI video driver, and that only use case
vanished over 3 years ago (see commit 677bd810, "ACPI video: remove
output switching control".) So this is dead code and I guess we can
remove it now.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agofujitsu-laptop: Drop unneeded include
Jean Delvare [Wed, 19 Mar 2014 18:38:46 +0000 (19:38 +0100)]
fujitsu-laptop: Drop unneeded include

The fujitsu-laptop driver includes <linux/video_output.h> but doesn't
call any of its functions. Drop the unneeded include to avoid
unnecessary driver rebuilds.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoacer-wmi: Stop selecting VIDEO_OUTPUT_CONTROL
Jean Delvare [Mon, 17 Mar 2014 14:48:23 +0000 (15:48 +0100)]
acer-wmi: Stop selecting VIDEO_OUTPUT_CONTROL

ACPI_VIDEO no longer depends on VIDEO_OUTPUT_CONTROL, so drivers which
want to select ACPI_VIDEO no longer have to select
VIDEO_OUTPUT_CONTROL.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL
Jean Delvare [Mon, 17 Mar 2014 15:17:49 +0000 (16:17 +0100)]
ACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL

ACPI_VIDEO no longer depends on VIDEO_OUTPUT_CONTROL, so drivers which
want to select ACPI_VIDEO no longer have to select
VIDEO_OUTPUT_CONTROL.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: fix ACPI_VIDEO dependencies
Jean Delvare [Mon, 17 Mar 2014 14:46:44 +0000 (15:46 +0100)]
ACPI / video: fix ACPI_VIDEO dependencies

ACPI_VIDEO stopped depending on VIDEO_OUTPUT_CONTROL over 3 years ago
(see commit 677bd810, "ACPI video: remove output switching control".)
So it's about time to remove the Kconfig dependency between these two
options.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE}
Viresh Kumar [Wed, 19 Mar 2014 05:54:58 +0000 (11:24 +0530)]
cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE}

Two cpufreq notifiers CPUFREQ_RESUMECHANGE and CPUFREQ_SUSPENDCHANGE have
not been used for some time, so remove them to clean up code a bit.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Do not allow ->setpolicy drivers to provide ->target
Rafael J. Wysocki [Wed, 19 Mar 2014 11:48:30 +0000 (12:48 +0100)]
cpufreq: Do not allow ->setpolicy drivers to provide ->target

cpufreq drivers that provide the ->setpolicy() callback are supposed
to have integrated governors, so they don't need to set ->target()
or ->target_index() and may confuse the core if any of these callbacks
is present.

For this reason, add a check preventing ->setpolicy cpufreq drivers
from registering if they have non-NULL ->target or ->target_index.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
10 years agocpufreq: arm_big_little: set 'physical_cluster' for each CPU
viresh kumar [Fri, 14 Mar 2014 06:40:55 +0000 (12:10 +0530)]
cpufreq: arm_big_little: set 'physical_cluster' for each CPU

We have a per-CPU variable for managing which cluster a CPU belongs to.
Currently, physical_cluster is set for policy->cpu only which leads to
the following on some SoC's:

 - There are two clusters:
   - Cluster 0 has four ARM Cortex A7 CPUs (slower ones): 0,1,2,3
   - Cluster 1 has four ARM Cortex A15 CPUs (faster ones): 4,5,6,7
 - CPUs are booted in order 0,1..7 and so initially policy->cpu for A7 cluster
   would be 0 and for A15 cluster would be 4.
 - Now CPU4 (i.e. A15_0) is hotplugged out and so policy->cpu for A15 cluster
   becomes 5 (i.e. A15_1).
 - But physical cluster is only set for CPU0 and CPU4 in ARM big LITTLE driver
   and isn't updated.
 - Now freq change request comes for A15 cluster and we would try to update freq
   of physical_cluster of CPU5, i.e. A15_1. And it is currently set to zero
   (default value of uninitialized global variables).
 - And so we actually try to change freq of A7 cluster instead of A15.
 - This also results in kernel crash as sometimes we might request freq above
   A7's limit and CPU may behave badly..

Fix this by initializing physical_cluster for all CPUs of a policy.

Based on previous work by Xin Wang.

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: make vexpress driver depend on bL core driver
viresh kumar [Fri, 14 Mar 2014 06:40:54 +0000 (12:10 +0530)]
cpufreq: arm_big_little: make vexpress driver depend on bL core driver

Currently vexpress big LITTLE driver selects ARM_BIG_LITTLE_CPUFREQ, so
if CONFIG_BIG_LITTLE isn't enabled and CONFIG_ARM_VEXPRESS_SPC_CPUFREQ
is enabled, we get the following build warnings:

warning: (ARM_VEXPRESS_SPC_CPUFREQ) selects ARM_BIG_LITTLE_CPUFREQ which has
unmet direct dependencies (ARCH_HAS_CPUFREQ && CPU_FREQ && (ARM || ARM64) && ARM
&& BIG_LITTLE && ARM_CPU_TOPOLOGY && HAVE_CLK)

To fix this, make ARM_VEXPRESS_SPC_CPUFREQ depend on ARM_BIG_LITTLE_CPUFREQ
instead of selecting it.

This also moves the entry for ARM_VEXPRESS_SPC_CPUFREQ along with other
big LITTLE config entries.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / button: Add ACPI Button event via netlink routine
Lan Tianyu [Sat, 15 Mar 2014 17:37:13 +0000 (13:37 -0400)]
ACPI / button: Add ACPI Button event via netlink routine

Commit 1696d9d (ACPI: Remove the old /proc/acpi/event interface)
removed ACPI Button event which originally was sent to userspace via
/proc/acpi/event. This caused ACPI shutdown regression on gentoo
in VirtualBox. Now ACPI events are sent to userspace via netlink,
so add ACPI Button event back via netlink routine.

References: https://bugzilla.kernel.org/show_bug.cgi?id=71721
Reported-and-tested-by: Richard Musil <richard.musil@gmail.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Cc: 3.11+ <stable@vger.kernel.org> # 3.11+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI: Remove duplicate definitions of PREFIX
Hanjun Guo [Thu, 13 Mar 2014 04:47:39 +0000 (12:47 +0800)]
ACPI: Remove duplicate definitions of PREFIX

We already have a macro for PREFIX of "ACPI: " in
drivers/acpi/internal.h, so remove the duplicate ones
in ACPI drivers when internal.h is included.

Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / AC: recheck adapter status upon battery status changes
Alexander Mezin [Tue, 11 Mar 2014 17:58:48 +0000 (00:58 +0700)]
ACPI / AC: recheck adapter status upon battery status changes

On HP Pavilion dv6-6179er there are no notifications when AC adapter
is plugged/unplugged.
However, when AC status is read (acpi_ac_get_state), and if AC status
has changed, AML code triggers the notification.

This patch solves the problem by re-reading AC adapter status upon
ACPI_BATTERY_NOTIFY_STATUS notification.

Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com>
Acked-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / battery: call ACPI notifier chain in acpi_battery_notify
Alexander Mezin [Tue, 11 Mar 2014 17:58:47 +0000 (00:58 +0700)]
ACPI / battery: call ACPI notifier chain in acpi_battery_notify

Allow other drivers to subscribe to battery status notifications.
Just like AC driver does.

Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com>
Acked-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / battery: move some ACPI_BATTERY_* definitions to header
Alexander Mezin [Tue, 11 Mar 2014 17:58:46 +0000 (00:58 +0700)]
ACPI / battery: move some ACPI_BATTERY_* definitions to header

ACPI_BATTERY_CLASS is used in multiple places.
Also, I'll use ACPI_BATTERY_NOTIFY_STATUS inside AC driver in
one of following patches.

So, create a header file and move ACPI_BATTERY_CLASS and
ACPI_BATTERY_NOTIFY_* definitions into it.
Also, remove copy of ACPI_BATTERY_CLASS from sbs.c

Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)."
Robert Moore [Wed, 5 Mar 2014 06:12:01 +0000 (14:12 +0800)]
ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)."

This reverts commit aae576e5faefa8ba70647efa320d4747b6375f1e.
Push and Pop are not portable "enough", and caused problems for
some ACPICA customers.

Signed-off-by: Robert 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 branch 'acpi-config' into acpica
Rafael J. Wysocki [Tue, 18 Mar 2014 00:53:28 +0000 (01:53 +0100)]
Merge branch 'acpi-config' into acpica

Conflicts:
include/acpi/platform/aclinux.h

10 years agoACPICA: Update version to 20140214.
Bob Moore [Wed, 26 Feb 2014 02:33:55 +0000 (10:33 +0800)]
ACPICA: Update version to 20140214.

Version 20140214.

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: Prevent infinite loops when traversing corrupted lists.
Bob Moore [Wed, 26 Feb 2014 02:33:47 +0000 (10:33 +0800)]
ACPICA: Prevent infinite loops when traversing corrupted lists.

This change hardens the ACPICA code to detect circular linked object
lists and prevent an infinite loop if such corruption exists.

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: Debugger: Add missing objects; Traverse linked lists
Bob Moore [Wed, 26 Feb 2014 02:33:32 +0000 (10:33 +0800)]
ACPICA: Debugger: Add missing objects; Traverse linked lists

This change adds support for two missing objects, the "extra" and
"data" secondary objects, as well as adding support to traverse and
display linked lists related to ACPICA objects.

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 text: ACPICA policy for new _OSI strings. No functional change.
Bob Moore [Wed, 26 Feb 2014 02:33:18 +0000 (10:33 +0800)]
ACPICA: Add text: ACPICA policy for new _OSI strings. No functional change.

Adds further information about why new _OSI strings should be
adopted by all hosts as soon as possible.

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 for _PRP predefined name.
Bob Moore [Wed, 26 Feb 2014 02:33:08 +0000 (10:33 +0800)]
ACPICA: Update for _PRP predefined name.

Allow objects of type "reference" in the second subpackage element.

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/improve global variable declarations.
Lv Zheng [Wed, 26 Feb 2014 02:32:38 +0000 (10:32 +0800)]
ACPICA: Cleanup/improve global variable declarations.

This change cleans up the entire global variable mechaninism including
the related macros. Also reduces warnings from the "sparse" utility
in the Linux environment. 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: Comment update - no functional change.
Bob Moore [Wed, 26 Feb 2014 02:31:18 +0000 (10:31 +0800)]
ACPICA: Comment update - no functional change.

Change all instances of "sub-package" to "subpackage" for consistency.

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 'pm-cpufreq' material.
Rafael J. Wysocki [Mon, 17 Mar 2014 12:51:39 +0000 (13:51 +0100)]
Merge back earlier 'pm-cpufreq' material.

10 years agoMerge branch 'acpi-fan'
Rafael J. Wysocki [Mon, 17 Mar 2014 12:48:25 +0000 (13:48 +0100)]
Merge branch 'acpi-fan'

* acpi-fan:
  ACPI / fan: do nothing in suspend and poweroff callback

10 years agoMerge branch 'acpi-ost'
Rafael J. Wysocki [Mon, 17 Mar 2014 12:48:18 +0000 (13:48 +0100)]
Merge branch 'acpi-ost'

* acpi-ost:
  ACPI: Drop acpi_evaluate_hotplug_ost() and ACPI_HOTPLUG_OST
  ACPI: use device name LNXSYBUS.xx for ACPI \_SB and \_TZ objects
  ACPI / processor: use acpi_evaluate_ost() to replace open-coded version
  ACPI / PAD / xen: use acpi_evaluate_ost() to replace open-coded version
  ACPI / PAD: use acpi_evaluate_ost() to replace open-coded version
  ACPI: rename acpi_evaluate_hotplug_ost() to acpi_evaluate_ost()

10 years agoMerge branch 'acpi-config'
Rafael J. Wysocki [Mon, 17 Mar 2014 12:47:24 +0000 (13:47 +0100)]
Merge branch 'acpi-config'

* acpi-config:
  ACPI: Remove Kconfig symbol ACPI_PROCFS
  ACPI / APEI: Remove X86 redundant dependency for APEI GHES.
  ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE_ONLY

10 years agoMerge branch 'acpi-hotplug'
Rafael J. Wysocki [Mon, 17 Mar 2014 12:47:14 +0000 (13:47 +0100)]
Merge branch 'acpi-hotplug'

* acpi-hotplug:
  ACPI / hotplug: Rework deferred execution of acpi_device_hotplug()
  ACPI / dock: Update copyright notice
  ACPI / dock: Drop remove_dock_dependent_devices()
  ACPI / dock: Drop struct acpi_dock_ops and all code related to it
  ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices
  ACPI / dock: Add .uevent() callback to struct acpi_hotplug_context
  ACPI / dock: Use callback pointers from devices' ACPI hotplug contexts
  ACPI / dock: Use ACPI device object pointers instead of ACPI handles
  ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context
  ACPI / hotplug / PCI: Do not clear event callback pointer for docks
  ACPI / dock: Associate dock platform devices with ACPI device objects
  ACPI / dock: Pass ACPI device pointer to acpi_device_is_battery()
  ACPI / dock: Dispatch dock notifications from the global notify handler

10 years agoMerge branch 'acpi-pci-hotplug'
Rafael J. Wysocki [Mon, 17 Mar 2014 12:47:04 +0000 (13:47 +0100)]
Merge branch 'acpi-pci-hotplug'

* acpi-pci-hotplug: (23 commits)
  ACPI / hotplug / PCI: Use pci_device_is_present()
  ACPI / hotplug / PCI: Add ACPIPHP contexts to devices handled by PCIeHP
  ACPI / hotplug / PCI: Rename register_slot() to acpiphp_add_context()
  ACPI / hotplug / PCI: Execute _EJ0 under the ACPI scan lock
  ACPI / hotplug / PCI: Rework acpiphp_check_host_bridge()
  ACPI / hotplug / PCI: Hotplug notifications from acpi_bus_notify()
  ACPI / hotplug / PCI: Simplify acpi_install_hotplug_notify_handler()
  ACPI / hotplug / PCI: Rework the handling of eject requests
  ACPI / hotplug / PCI: Consolidate ACPIPHP with ACPI core hotplug
  ACPI / hotplug / PCI: Define hotplug context lock in the core
  ACPI / hotplug: Fix potential race in acpi_bus_notify()
  ACPICA: Introduce acpi_get_data_full() and rework acpi_get_data()
  ACPI / hotplug / PCI: Do not pass ACPI handle to hotplug_event()
  ACPI / hotplug / PCI: Use acpi_handle_debug() in hotplug_event()
  ACPI / hotplug / PCI: Simplify hotplug_event()
  ACPI / hotplug / PCI: Drop crit_sect locking
  ACPI / hotplug / PCI: Drop acpiphp_bus_add()
  ACPI / hotplug / PCI: Store acpi_device pointer in acpiphp_context
  ACPI / hotplug / PCI: Rework acpiphp_no_hotplug()
  ACPI / hotplug / PCI: Drop acpiphp_bus_trim()
  ...

10 years agoLinux 3.14-rc7 v3.14-rc7
Linus Torvalds [Mon, 17 Mar 2014 01:51:24 +0000 (18:51 -0700)]
Linux 3.14-rc7

10 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 16 Mar 2014 17:42:07 +0000 (10:42 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Three small fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/clock: Prevent tracing recursion in sched_clock_cpu()
  stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus()
  sched/deadline: Deny unprivileged users to set/change SCHED_DEADLINE policy

10 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 16 Mar 2014 17:41:21 +0000 (10:41 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Misc smaller fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86: Fix leak in uncore_type_init failure paths
  perf machine: Use map as success in ip__resolve_ams
  perf symbols: Fix crash in elf_section_by_name
  perf trace: Decode architecture-specific signal numbers

10 years agoipc: Fix 2 bugs in msgrcv() MSG_COPY implementation
Michael Kerrisk [Mon, 10 Mar 2014 13:46:07 +0000 (14:46 +0100)]
ipc: Fix 2 bugs in msgrcv() MSG_COPY implementation

While testing and documenting the msgrcv() MSG_COPY flag that Stanislav
Kinsbursky added in commit 4a674f34ba04 ("ipc: introduce message queue
copy feature" => kernel 3.8), I discovered a couple of bugs in the
implementation.  The two bugs concern MSG_COPY interactions with other
msgrcv() flags, namely:

 (A) MSG_COPY + MSG_EXCEPT
 (B) MSG_COPY + !IPC_NOWAIT

The bugs are distinct (and the fix for the first one is obvious),
however my fix for both is a single-line patch, which is why I'm
combining them in a single mail, rather than writing two mails+patches.

 ===== (A) MSG_COPY + MSG_EXCEPT =====

With the addition of the MSG_COPY flag, there are now two msgrcv()
flags--MSG_COPY and MSG_EXCEPT--that modify the meaning of the 'msgtyp'
argument in unrelated ways.  Specifying both in the same call is a
logical error that is currently permitted, with the effect that MSG_COPY
has priority and MSG_EXCEPT is ignored.  The call should give an error
if both flags are specified.  The patch below implements that behavior.

 ===== (B) (B) MSG_COPY + !IPC_NOWAIT =====

The test code that was submitted in commit 3a665531a3b7 ("selftests: IPC
message queue copy feature test") shows MSG_COPY being used in
conjunction with IPC_NOWAIT.  In other words, if there is no message at
the position 'msgtyp'.  return immediately with the error in ENOMSG.

What was not (fully) tested is the behavior if MSG_COPY is specified
*without* IPC_NOWAIT, and there is an odd behavior.  If the queue
contains less than 'msgtyp' messages, then the call blocks until the
next message is written to the queue.  At that point, the msgrcv() call
returns a copy of the newly added message, regardless of whether that
message is at the ordinal position 'msgtyp'.  This is clearly bogus, and
problematic for applications that might want to make use of the MSG_COPY
flag.

I considered the following possible solutions to this problem:

 (1) Force the call to block until a message *does* appear at the
     position 'msgtyp'.

 (2) If the MSG_COPY flag is specified, the kernel should implicitly add
     IPC_NOWAIT, so that the call fails with ENOMSG for this case.

 (3) If the MSG_COPY flag is specified, but IPC_NOWAIT is not, generate
     an error (probably, EINVAL is the right one).

I do not know if any application would really want to have the
functionality of solution (1), especially since an application can
determine in advance the number of messages in the queue using msgctl()
IPC_STAT.  Obviously, this solution would be the most work to implement.

Solution (2) would have the effect of silently fixing any applications
that tried to employ broken behavior.  However, it would mean that if we
later decided to implement solution (1), then user-space could not
easily detect what the kernel supports (but, since I'm somewhat doubtful
that solution (1) is needed, I'm not sure that this is much of a
problem).

Solution (3) would have the effect of informing broken applications that
they are doing something broken.  The downside is that this would cause
a ABI breakage for any applications that are currently employing the
broken behavior.  However:

a) Those applications are almost certainly not getting the results they
   expect.
b) Possibly, those applications don't even exist, because MSG_COPY is
   currently hidden behind CONFIG_CHECKPOINT_RESTORE.

The upside of solution (3) is that if we later decided to implement
solution (1), user-space could determine what the kernel supports, via
the error return.

In my view, solution (3) is mildly preferable to solution (2), and
solution (1) could still be done later if anyone really cares.  The
patch below implements solution (3).

PS.  For anyone out there still listening, it's the usual story:
documenting an API (and the thinking about, and the testing of the API,
that documentation entails) is the one of the single best ways of
finding bugs in the API, as I've learned from a lot of experience.  Best
to do that documentation before releasing the API.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: stable@vger.kernel.org
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 15 Mar 2014 19:41:53 +0000 (12:41 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of six fixes.  Two are instant crash/null deref types
  (storvsc and isci).  The two qla2xxx are initialisation problems that
  cause MSI-X failures and card misdetection, the isci erroneous macro
  is actually illegal C that's causing a miscompile with certain gcc
  versions and the be2iscsi bad if expression is a static checker fix"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] storvsc: NULL pointer dereference fix
  [SCSI] qla2xxx: Poll during initialization for ISP25xx and ISP83xx
  [SCSI] isci: correct erroneous for_each_isci_host macro
  [SCSI] isci: fix reset timeout handling
  [SCSI] be2iscsi: fix bad if expression
  [SCSI] qla2xxx: Fix multiqueue MSI-X registration.

10 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 15 Mar 2014 01:07:51 +0000 (18:07 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "Two x86 fixes: Suresh's eager FPU fix, and a fix to the NUMA quirk for
  AMD northbridges.

  This only includes Suresh's fix patch, not the "mostly a cleanup"
  patch which had __init issues"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/amd/numa: Fix northbridge quirk to assign correct NUMA node
  x86, fpu: Check tsk_used_math() in kernel_fpu_end() for eager FPU

10 years agoMerge tag 'pm+acpi-3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sat, 15 Mar 2014 01:02:02 +0000 (18:02 -0700)]
Merge tag 'pm+acpi-3.14-rc7' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
 "Three of these are regression fixes, for two recent regressions and
  one introduced during the 3.13 cycle, and the fourth one is a working
  version of the fix that had to be reverted last time.

  Specifics:

   - A recent ACPI resources handling fix overlooked the fact that it
     had to update the ACPI PNP subsystem's resources parsing too and
     caused confusing warning messages to be printed during system
     intialization on some systems (with arguably buggy ACPI tables).
     Fix from Zhang Rui.

   - Moving the early ACPI initialization before timekeeping_init()
     earlier in this cycle broke fast TSC calibration on at least one
     system, so it needs to be done later, but still before
     efi_enter_virtual_mode() to allow the EFI initialization to refer
     to ACPI.

   - A change related to code duplication reduction in the cpufreq core
     inadvertently caused cpufreq intialization to fail for some CPUs
     handled by intel_pstate by adding checks that may fail for that
     driver, but aren't even necessary when it is used.  The issue is
     addressed by preventing those checks from run in the configurations
     in which they aren't needed.

   - If the Hardware Reduced ACPI flag is set in the ACPI tables, system
     suspend, hibernation and ACPI power off will only work when special
     sleep control and sleep status registeres are provided (their
     addresses in the ACPI tables are not zero).  If those registers are
     not available, the features in question have no chances to work, so
     they shouldn't even be regarded as supported.  That helps with
     power off in particular, because alternative power off methods may
     be used then and they may actually work"

* tag 'pm+acpi-3.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / sleep: Add extra checks for HW Reduced ACPI mode sleep states
  ACPI / init: Invoke early ACPI initialization later
  cpufreq: Skip current frequency initialization for ->setpolicy drivers
  PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures

10 years agoMerge tag 'dm-3.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
Linus Torvalds [Sat, 15 Mar 2014 01:01:23 +0000 (18:01 -0700)]
Merge tag 'dm-3.14-fixes-4' of git://git./linux/kernel/git/device-mapper/linux-dm

Pull device-mapper fixes form Mike Snitzer:
 "Two small fixes for the DM cache target:

   - fix corruption with >2TB fast device due to truncation bug
   - fix access beyond end of origin device due to a partial block"

* tag 'dm-3.14-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm cache: fix access beyond end of origin device
  dm cache: fix truncation bug when copying a block to/from >2TB fast device

10 years agox86/amd/numa: Fix northbridge quirk to assign correct NUMA node
Daniel J Blueman [Thu, 13 Mar 2014 11:43:01 +0000 (19:43 +0800)]
x86/amd/numa: Fix northbridge quirk to assign correct NUMA node

For systems with multiple servers and routed fabric, all
northbridges get assigned to the first server. Fix this by also
using the node reported from the PCI bus. For single-fabric
systems, the northbriges are on PCI bus 0 by definition, which
are on NUMA node 0 by definition, so this is invarient on most
systems.

Tested on fam10h and fam15h single and multi-fabric systems and
candidate for stable.

Signed-off-by: Daniel J Blueman <daniel@numascale.com>
Acked-by: Steffen Persvold <sp@numascale.com>
Acked-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/1394710981-3596-1-git-send-email-daniel@numascale.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 14 Mar 2014 04:32:16 +0000 (21:32 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Pretty minor set of fixes for radeon, ttm and vmwgfx.  The ttm ones
  are a regression and an oops seen on server chipsets"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix a surface reference corner-case in legacy emulation mode
  drm/radeon/cik: properly set compute ring status on disable
  drm/radeon/cik: stop the sdma engines in the enable() function
  drm/radeon/cik: properly set sdma ring status on disable
  drm/radeon: fix runpm disabling on non-PX harder
  drm/ttm: don't oops if no invalidate_caches()
  drm/ttm: Work around performance regression with VM_PFNMAP

10 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 14 Mar 2014 04:25:40 +0000 (21:25 -0700)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c Kconfig fix from Wolfram Sang.

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: Remove usage of orphaned symbol OF_I2C

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 14 Mar 2014 03:38:36 +0000 (20:38 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "I know this is a bit more than you want to see, and I've told the
  wireless folks under no uncertain terms that they must severely scale
  back the extent of the fixes they are submitting this late in the
  game.

  Anyways:

   1) vmxnet3's netpoll doesn't perform the equivalent of an ISR, which
      is the correct implementation, like it should.  Instead it does
      something like a NAPI poll operation.  This leads to crashes.

      From Neil Horman and Arnd Bergmann.

   2) Segmentation of SKBs requires proper socket orphaning of the
      fragments, otherwise we might access stale state released by the
      release callbacks.

      This is a 5 patch fix, but the initial patches are giving
      variables and such significantly clearer names such that the
      actual fix itself at the end looks trivial.

      From Michael S.  Tsirkin.

   3) TCP control block release can deadlock if invoked from a timer on
      an already "owned" socket.  Fix from Eric Dumazet.

   4) In the bridge multicast code, we must validate that the
      destination address of general queries is the link local all-nodes
      multicast address.  From Linus Lüssing.

   5) The x86 BPF JIT support for negative offsets puts the parameter
      for the helper function call in the wrong register.  Fix from
      Alexei Starovoitov.

   6) The descriptor type used for RTL_GIGA_MAC_VER_17 chips in the
      r8169 driver is incorrect.  Fix from Hayes Wang.

   7) The xen-netback driver tests skb_shinfo(skb)->gso_type bits to see
      if a packet is a GSO frame, but that's not the correct test.  It
      should use skb_is_gso(skb) instead.  Fix from Wei Liu.

   8) Negative msg->msg_namelen values should generate an error, from
      Matthew Leach.

   9) at86rf230 can deadlock because it takes the same lock from it's
      ISR and it's hard_start_xmit method, without disabling interrupts
      in the latter.  Fix from Alexander Aring.

  10) The FEC driver's restart doesn't perform operations in the correct
      order, so promiscuous settings can get lost.  Fix from Stefan
      Wahren.

  11) Fix SKB leak in SCTP cookie handling, from Daniel Borkmann.

  12) Reference count and memory leak fixes in TIPC from Ying Xue and
      Erik Hugne.

  13) Forced eviction in inet_frag_evictor() must strictly make sure all
      frags are deleted, otherwise module unload (f.e.  6lowpan) can
      crash.  Fix from Florian Westphal.

  14) Remove assumptions in AF_UNIX's use of csum_partial() (which it
      uses as a hash function), which breaks on PowerPC.  From Anton
      Blanchard.

      The main gist of the issue is that csum_partial() is defined only
      as a value that, once folded (f.e.  via csum_fold()) produces a
      correct 16-bit checksum.  It is legitimate, therefore, for
      csum_partial() to produce two different 32-bit values over the
      same data if their respective alignments are different.

  15) Fix endiannes bug in MAC address handling of ibmveth driver, also
      from Anton Blanchard.

  16) Error checks for ipv6 exthdrs offload registration are reversed,
      from Anton Nayshtut.

  17) Externally triggered ipv6 addrconf routes should count against the
      garbage collection threshold.  Fix from Sabrina Dubroca.

  18) The PCI shutdown handler added to the bnx2 driver can wedge the
      chip if it was not brought up earlier already, which in particular
      causes the firmware to shut down the PHY.  Fix from Michael Chan.

  19) Adjust the sanity WARN_ON_ONCE() in qdisc_list_add() because as
      currently coded it can and does trigger in legitimate situations.
      From Eric Dumazet.

  20) BNA driver fails to build on ARM because of a too large udelay()
      call, fix from Ben Hutchings.

  21) Fair-Queue qdisc holds locks during GFP_KERNEL allocations, fix
      from Eric Dumazet.

  22) The vlan passthrough ops added in the previous release causes a
      regression in source MAC address setting of outgoing headers in
      some circumstances.  Fix from Peter Boström"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (70 commits)
  ipv6: Avoid unnecessary temporary addresses being generated
  eth: fec: Fix lost promiscuous mode after reconnecting cable
  bonding: set correct vlan id for alb xmit path
  at86rf230: fix lockdep splats
  net/mlx4_en: Deregister multicast vxlan steering rules when going down
  vmxnet3: fix building without CONFIG_PCI_MSI
  MAINTAINERS: add networking selftests to NETWORKING
  net: socket: error on a negative msg_namelen
  MAINTAINERS: Add tools/net to NETWORKING [GENERAL]
  packet: doc: Spelling s/than/that/
  net/mlx4_core: Load the IB driver when the device supports IBoE
  net/mlx4_en: Handle vxlan steering rules for mac address changes
  net/mlx4_core: Fix wrong dump of the vxlan offloads device capability
  xen-netback: use skb_is_gso in xenvif_start_xmit
  r8169: fix the incorrect tx descriptor version
  tools/net/Makefile: Define PACKAGE to fix build problems
  x86: bpf_jit: support negative offsets
  bridge: multicast: enable snooping on general queries only
  bridge: multicast: add sanity check for general query destination
  tcp: tcp_release_cb() should release socket ownership
  ...

10 years agoi2c: Remove usage of orphaned symbol OF_I2C
Richard Weinberger [Sun, 9 Feb 2014 18:47:40 +0000 (19:47 +0100)]
i2c: Remove usage of orphaned symbol OF_I2C

The symbol is an orphan, don't depend on it anymore.

Signed-off-by: Richard Weinberger <richard@nod.at>
[wsa: enhanced commit message]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 687b81d083c0 (i2c: move OF helpers into the core)
Cc: stable@kernel.org
10 years agoMerge branches 'pnp', 'acpi-init', 'acpi-sleep' and 'pm-cpufreq'
Rafael J. Wysocki [Thu, 13 Mar 2014 21:12:30 +0000 (22:12 +0100)]
Merge branches 'pnp', 'acpi-init', 'acpi-sleep' and 'pm-cpufreq'

* pnp:
  PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures

* acpi-init:
  ACPI / init: Invoke early ACPI initialization later

* acpi-sleep:
  ACPI / sleep: Add extra checks for HW Reduced ACPI mode sleep states

* pm-cpufreq:
  cpufreq: Skip current frequency initialization for ->setpolicy drivers

10 years agoACPI / sleep: Add extra checks for HW Reduced ACPI mode sleep states
Rafael J. Wysocki [Thu, 13 Mar 2014 21:11:39 +0000 (22:11 +0100)]
ACPI / sleep: Add extra checks for HW Reduced ACPI mode sleep states

If the HW Reduced ACPI mode bit is set in the FADT, ACPICA uses
the optional sleep control and sleep status registers for making
the system enter sleep states (including S5), so it is not possible
to use system sleep states or power it off using ACPI if the HW
Reduced ACPI mode bit is set and those registers are not available.

For this reason, add a new function, acpi_sleep_state_supported(),
checking if the HW Reduced ACPI mode bit is set and whether or not
system sleep states are usable in that case in addition to checking
the return value of acpi_get_sleep_type_data() and make the ACPI
sleep setup routines use that function to check the availability of
system sleep states.

Among other things, this prevents the kernel from attempting to
use ACPI for powering off HW Reduced ACPI systems without the sleep
control and sleep status registers, because ACPI power off doesn't
have a chance to work on them.  That allows alternative power off
mechanisms that may actually work to be used on those systems.  The
affected machines include Dell Venue 8 Pro, Asus T100TA, Haswell
Desktop SDP and Ivy Bridge EP Demo depot.

References: https://bugzilla.kernel.org/show_bug.cgi?id=70931
Reported-by: Adam Williamson <awilliam@redhat.com>
Tested-by: Aubrey Li <aubrey.li@linux.intel.com>
Cc: 3.4+ <stable@vger.kernel.org> # 3.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoipv6: Avoid unnecessary temporary addresses being generated
Heiner Kallweit [Wed, 12 Mar 2014 21:13:19 +0000 (22:13 +0100)]
ipv6: Avoid unnecessary temporary addresses being generated

tmp_prefered_lft is an offset to ifp->tstamp, not now. Therefore
age needs to be added to the condition.

Age calculation in ipv6_create_tempaddr is different from the one
in addrconf_verify and doesn't consider ADDRCONF_TIMER_FUZZ_MINUS.
This can cause age in ipv6_create_tempaddr to be less than the one
in addrconf_verify and therefore unnecessary temporary address to
be generated.
Use age calculation as in addrconf_modify to avoid this.

Signed-off-by: Heiner Kallweit <heiner.kallweit@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoeth: fec: Fix lost promiscuous mode after reconnecting cable
Stefan Wahren [Wed, 12 Mar 2014 10:28:19 +0000 (11:28 +0100)]
eth: fec: Fix lost promiscuous mode after reconnecting cable

If the Freescale fec is in promiscuous mode and network cable is
reconnected then the promiscuous mode get lost. The problem is caused
by a too soon call of set_multicast_list to re-enable promisc mode.
The FEC_R_CNTRL register changes are overwritten by fec_restart.

This patch fixes this by moving the call behind the init of FEC_R_CNTRL
register in fec_restart.

Successful tested on a i.MX28 board.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: set correct vlan id for alb xmit path
dingtianhong [Wed, 12 Mar 2014 09:31:59 +0000 (17:31 +0800)]
bonding: set correct vlan id for alb xmit path

The commit d3ab3ffd1d728d7ee77340e7e7e2c7cfe6a4013e
(bonding: use rlb_client_info->vlan_id instead of ->tag)
remove the rlb_client_info->tag, but occur some issues,
The vlan_get_tag() will return 0 for success and -EINVAL for
error, so the client_info->vlan_id always be set to 0 if the
vlan_get_tag return 0 for success, so the client_info would
never get a correct vlan id.

We should only set the vlan id to 0 when the vlan_get_tag return error.

Fixes: d3ab3ffd1d7 (bonding: use rlb_client_info->vlan_id instead of ->tag)

CC: Ding Tianhong <dingtianhong@huawei.com>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Acked-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoat86rf230: fix lockdep splats
Alexander Aring [Wed, 12 Mar 2014 07:21:24 +0000 (08:21 +0100)]
at86rf230: fix lockdep splats

This patch fix a lockdep in the at86rf230 driver, otherwise we get:

[   30.206517] =================================
[   30.211078] [ INFO: inconsistent lock state ]
[   30.215647] 3.14.0-20140108-1-00994-g32e9426 #163 Not tainted
[   30.221660] ---------------------------------
[   30.226222] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
[   30.232514] systemd-udevd/157 [HC1[1]:SC0[0]:HE0:SE1] takes:
[   30.238439]  (&(&lp->lock)->rlock){?.+...}, at: [<c03600f8>] at86rf230_isr+0x18/0x44
[   30.246621] {HARDIRQ-ON-W} state was registered at:
[   30.251728]   [<c0061ce4>] __lock_acquire+0x7a4/0x18d8
[   30.257135]   [<c0063500>] lock_acquire+0x68/0x7c
[   30.262071]   [<c0588820>] _raw_spin_lock+0x28/0x38
[   30.267203]   [<c0361240>] at86rf230_xmit+0x1c/0x144
[   30.272412]   [<c057ba6c>] mac802154_xmit_worker+0x88/0x148
[   30.278271]   [<c0047844>] process_one_work+0x274/0x404
[   30.283761]   [<c00484c0>] worker_thread+0x228/0x374
[   30.288971]   [<c004cfb8>] kthread+0xd0/0xe4
[   30.293455]   [<c000dac8>] ret_from_fork+0x14/0x2c
[   30.298493] irq event stamp: 8948
[   30.301963] hardirqs last  enabled at (8947): [<c00cb290>] __kmalloc+0xb4/0x110
[   30.309636] hardirqs last disabled at (8948): [<c00115d4>] __irq_svc+0x34/0x5c
[   30.317215] softirqs last  enabled at (8452): [<c0037324>] __do_softirq+0x1dc/0x264
[   30.325243] softirqs last disabled at (8439): [<c0037638>] irq_exit+0x80/0xf4

We use the lp->lock inside the isr of at86rf230, that's why we need the
irqsave spinlock calls.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/mlx4_en: Deregister multicast vxlan steering rules when going down
Or Gerlitz [Thu, 13 Mar 2014 12:52:15 +0000 (14:52 +0200)]
net/mlx4_en: Deregister multicast vxlan steering rules when going down

When mlx4_en_stop_port() is called, we need to deregister also the
tunnel steering rules that relate to multicast.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovmxnet3: fix building without CONFIG_PCI_MSI
Arnd Bergmann [Thu, 13 Mar 2014 09:44:34 +0000 (10:44 +0100)]
vmxnet3: fix building without CONFIG_PCI_MSI

Since commit d25f06ea466e "vmxnet3: fix netpoll race condition",
the vmxnet3 driver fails to build when CONFIG_PCI_MSI is disabled,
because it unconditionally references the vmxnet3_msix_rx()
function.

To fix this, use the same #ifdef in the caller that exists around
the function definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Shreyas Bhatewara <sbhatewara@vmware.com>
Cc: "VMware, Inc." <pv-drivers@vmware.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: stable@vger.kernel.org
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMAINTAINERS: add networking selftests to NETWORKING
Daniel Borkmann [Thu, 13 Mar 2014 09:18:53 +0000 (10:18 +0100)]
MAINTAINERS: add networking selftests to NETWORKING

Add it to NETWORKING [GENERAL] to make sure patches for selftests
go to the netdev list as well.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge tag 'ttm-fixes-3.14-2014-03-12' of git://people.freedesktop.org/~thomash/linux...
Dave Airlie [Thu, 13 Mar 2014 07:31:24 +0000 (17:31 +1000)]
Merge tag 'ttm-fixes-3.14-2014-03-12' of git://people.freedesktop.org/~thomash/linux into drm-fixes

Second pull request of 2014-03-12. The first one was requested to be canceled.

Rob's fix for oops on invalidate_caches() and a fix for a
performance regression.

* tag 'ttm-fixes-3.14-2014-03-12' of git://people.freedesktop.org/~thomash/linux:
  drm/ttm: don't oops if no invalidate_caches()
  drm/ttm: Work around performance regression with VM_PFNMAP

10 years agoMerge branch 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Thu, 13 Mar 2014 07:31:01 +0000 (17:31 +1000)]
Merge branch 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

A few more radeon fixes.

* 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon/cik: properly set compute ring status on disable
  drm/radeon/cik: stop the sdma engines in the enable() function
  drm/radeon/cik: properly set sdma ring status on disable
  drm/radeon: fix runpm disabling on non-PX harder

10 years agoMerge tag 'vmwgfx-fixes-3.14-2014-03-13' of git://people.freedesktop.org/~thomash...
Dave Airlie [Thu, 13 Mar 2014 07:30:31 +0000 (17:30 +1000)]
Merge tag 'vmwgfx-fixes-3.14-2014-03-13' of git://people.freedesktop.org/~thomash/linux into drm-fixes

Pull request of 2014-03-13

one minor fix for new hw

* tag 'vmwgfx-fixes-3.14-2014-03-13' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: Fix a surface reference corner-case in legacy emulation mode

10 years agodrm/vmwgfx: Fix a surface reference corner-case in legacy emulation mode
Thomas Hellstrom [Wed, 12 Mar 2014 19:42:31 +0000 (20:42 +0100)]
drm/vmwgfx: Fix a surface reference corner-case in legacy emulation mode

If running on a gb-object capable device with a non-gb capable surface
exporter (X server) and a gb capable surface referencing client (GL driver),
the referencing client expects to find a shareable backing buffer attached to
the surface at reference time. This may not be the case if the surface has
not yet been validated. This would cause the surface reference IOCTL to
return an error.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
10 years agoMerge tag 'pci-v3.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Thu, 13 Mar 2014 01:29:34 +0000 (18:29 -0700)]
Merge tag 'pci-v3.14-fixes-2' of git://git./linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "These are two important regression fixes for bugs we've introduced so
  far in v3.14.

  One of the resource allocation changes from the merge window is broken
  for 32-bit kernels where we don't use _CRS for PCI host bridges
  (mostly pre-2008 machines), so there's a fix for that.

  The INTx enable change we put in after the merge window turned out to
  break pciehp because we re-enable INTx on the hotplug bridge, which
  apparently breaks MSI for future hotplug events"

* tag 'pci-v3.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: Don't check resource_size() in pci_bus_alloc_resource()
  PCI: Enable INTx in pci_reenable_device() only when MSI/MSI-X not enabled

10 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 13 Mar 2014 00:27:23 +0000 (17:27 -0700)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull KVM fixes from Paolo Bonzini:
 "The ARM patch fixes a build breakage with randconfig.  The x86 one
  fixes Windows guests on AMD processors"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: SVM: fix cr8 intercept window
  ARM: KVM: fix non-VGIC compilation

10 years agoACPI / init: Invoke early ACPI initialization later
Rafael J. Wysocki [Wed, 12 Mar 2014 23:22:58 +0000 (00:22 +0100)]
ACPI / init: Invoke early ACPI initialization later

Commit 73f7d1ca3263 (ACPI / init: Run acpi_early_init() before
timekeeping_init()) optimistically moved the early ACPI initialization
before timekeeping_init(), but that didn't work, because it broke fast
TSC calibration for Julian Wollrath on Thinkpad x121e (and most likely
for others too).  The reason is that acpi_early_init() enables the SCI
and that interferes with the fast TSC calibration mechanism.

Thus follow the original idea to execute acpi_early_init() before
efi_enter_virtual_mode() to help the EFI people for now and we can
revisit the other problem that commit 73f7d1ca3263 attempted to
address in the future (if really necessary).

Fixes: 73f7d1ca3263 (ACPI / init: Run acpi_early_init() before timekeeping_init())
Reported-by: Julian Wollrath <jwollrath@web.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>