]> rtime.felk.cvut.cz Git - linux-imx.git/log
linux-imx.git
11 years ago[media] s5p makefiles: don't override other selections on obj-[ym]
Mauro Carvalho Chehab [Thu, 20 Jun 2013 08:46:00 +0000 (05:46 -0300)]
[media] s5p makefiles: don't override other selections on obj-[ym]

The $obj-m/$obj-y vars should be adding new modules to build, not
overriding it. So, it should never use
$obj-y := foo.o
instead, it should use:
$obj-y += foo.o

Failing to do that is very bad, as it will suppress needed modules.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agopowerpc: Fix bad pmd error with book3E config
Aneesh Kumar K.V [Wed, 19 Jun 2013 06:34:26 +0000 (12:04 +0530)]
powerpc: Fix bad pmd error with book3E config

Book3E uses the hugepd at PMD level and don't encode pte directly
at the pmd level. So it will find the lower bits of pmd set
and the pmd_bad check throws error. Infact the current code
will never take the free_hugepd_range call at all because it will
clear the pmd if it find a hugepd pointer. Fix this by clearing
bad pmd only if it is not a hugepd pointer.

This is regression introduced by e2b3d202d1dba8f3546ed28224ce485bc50010be
"powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format"

Reported-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoACPICA: Update version to 20130517
Bob Moore [Sat, 8 Jun 2013 01:01:37 +0000 (09:01 +0800)]
ACPICA: Update version to 20130517

Version 20130517.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPICA: _CST repair: Handle null package entries
Lv Zheng [Sat, 8 Jun 2013 01:01:19 +0000 (09:01 +0800)]
ACPICA: _CST repair: Handle null package entries

Sort package only after null/bad elements have been removed.

Fixes a problem where the _CST sort was performed too early.  This
change sorts the package only after null/bad elements have been
removed.

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>
11 years agoACPICA: Add several repairs for _CST predefined name
Lv Zheng [Sat, 8 Jun 2013 01:01:07 +0000 (09:01 +0800)]
ACPICA: Add several repairs for _CST predefined name

Sort list based on the C-state, remove invalid/zero entries.
ACPICA BZ 890. Lv Zheng.

Fixes these possible problems with the _CST object:
 1. Sort the list ascending by C state type.
 2. Ensure type cannot be zero.
 3. A sub-package count of zero means _CST is meaningless.
 4. Count must match the number of C state sub-packages.

References: https://bugs.acpica.org/show_bug.cgi?id=890
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>
11 years agoACPICA: Move _PRT repair into the standard complex repair module
Lv Zheng [Sat, 8 Jun 2013 01:01:01 +0000 (09:01 +0800)]
ACPICA: Move _PRT repair into the standard complex repair module

Moved this longstanding repair to the relatively new predefined
name repair module. ACPICA BZ 783. Lv Zheng.

No functional change.  This change simply moves the repair code from
where it was originally implemented to the (more recent) repair
module where it now belongs.

References: https://bugs.acpica.org/show_bug.cgi?id=783
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>
11 years agoACPI / scan: Do not bind ACPI drivers to objects with scan handlers
Rafael J. Wysocki [Sat, 15 Jun 2013 22:36:41 +0000 (00:36 +0200)]
ACPI / scan: Do not bind ACPI drivers to objects with scan handlers

ACPI drivers must not be bound to device objects having scan handlers
attatched to them, so make acpi_device_probe() fail with -EINVAL if the
device object being probed has an ACPI scan handler.

After this change the analogous check introduced into the ACPI video
driver by commit 8c9b7a7 (ACPI / video: Do not bind to device objects
with a scan handler) is not necessary any more and may be dropped, so
drop it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Tony Luck <tony.luck@gmail.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
11 years agoACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery
Rafael J. Wysocki [Sat, 15 Jun 2013 22:36:26 +0000 (00:36 +0200)]
ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery

The IA64 System Bus Adapter (SBA) I/O MMU driver uses an ACPI driver
object to look for device objects it needs in the ACPI namespace, but
that leads to an ordering issue between that driver and the container
scan handler on ia64 HP rx2600.

Namely, on that machine the SBA I/O MMU device object in the ACPI
namespace has a _HID returning its own specific device ID and a
_CID returning a generic container device ID.  According to Toshi
Kani, the idea is that if a _HID is not mached by an I/O MMU driver,
the _CID should be matched by a generic container driver, so those
device IDs should be used mutually exclusively.

That is not what happens, however, because the container driver uses
an ACPI scan handler which is matched against the device object in
question before registering the SBA I/O MMU driver object.  As a
result, that scan handler claims the device object first.  The driver
binds to the same device object later, however, and they both happily
use it simultaneously going forward (fortunately, that doesn't cause
any real breakage to happen).

To avoid that ordering issue, make the SBA I/O MMU code use an ACPI
scan handler instead of an ACPI driver, so that it can claim the SBA
I/O MMU device object before the container driver (thanks to an
improved algorithm of matching ACPI device IDs used for ACPI scan
handlers, which matches device _HIDs against the registered scan
handlers before _CIDs).

This also reduces the kernel's memory footprint slightly by
avoiding to register a driver object that's not used after system
initialization, so having it registered (and present in sysfs)
throughout the system's life time isn't particularly useful.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Tony Luck <tony.luck@gmail.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
11 years agoUSB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable
Anders Hammarquist [Tue, 18 Jun 2013 23:45:48 +0000 (01:45 +0200)]
USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable

Add product id for Abbott strip port cable for Precision meter which
uses the TI 3410 chip.

Signed-off-by: Anders Hammarquist <iko@iko.pp.se>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoACPI / LPSS: Power up LPSS devices during enumeration
Rafael J. Wysocki [Tue, 18 Jun 2013 22:45:34 +0000 (00:45 +0200)]
ACPI / LPSS: Power up LPSS devices during enumeration

Commit 7cd8407 (ACPI / PM: Do not execute _PS0 for devices without
_PSC during initialization) introduced a regression on some systems
with Intel Lynxpoint Low-Power Subsystem (LPSS) where some devices
need to be powered up during initialization, but their device objects
in the ACPI namespace have _PS0 and _PS3 only (without _PSC or power
resources).

To work around this problem, make the ACPI LPSS driver power up
devices it knows about by using a new helper function
acpi_device_fix_up_power() that does all of the necessary
sanity checks and calls acpi_dev_pm_explicit_set() to put the
device into D0.

Reported-and-tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / PM: Fix error code path for power resources initialization
Rafael J. Wysocki [Tue, 18 Jun 2013 22:44:45 +0000 (00:44 +0200)]
ACPI / PM: Fix error code path for power resources initialization

Commit 781d737 (ACPI: Drop power resources driver) introduced a
bug in the power resources initialization error code path causing
a NULL pointer to be referenced in acpi_release_power_resource()
if there's an error triggering a jump to the 'err' label in
acpi_add_power_resource().  This happens because the list_node
field of struct acpi_power_resource has not been initialized yet
at this point and doing a list_del() on it is a bad idea.

To prevent this problem from occuring, initialize the list_node
field of struct acpi_power_resource upfront.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.9+ <stable@vger.kernel.org>
Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
11 years agoACPI / dock: Take ACPI scan lock in write_undock()
Rafael J. Wysocki [Sat, 15 Jun 2013 22:38:30 +0000 (00:38 +0200)]
ACPI / dock: Take ACPI scan lock in write_undock()

Since commit 3757b94 (ACPI / hotplug: Fix concurrency issues and
memory leaks) acpi_bus_scan() and acpi_bus_trim() must always be
called under acpi_scan_lock, but currently the following scenario
violating that requirement is possible:

 write_undock()
  handle_eject_request()
   hotplug_dock_devices()
    dock_remove_acpi_device()
     acpi_bus_trim()

Fix that by making write_undock() acquire acpi_scan_lock before
calling handle_eject_request() as appropriate (begin_undock() is
under the lock too in analogy with acpi_dock_deferred_cb()).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.9+ <stable@vger.kernel.org>
Acked-by: Toshi Kani <toshi.kani@hp.com>
11 years agoACPI / resources: call acpi_get_override_irq() only for legacy IRQ resources
Mika Westerberg [Mon, 20 May 2013 15:41:45 +0000 (15:41 +0000)]
ACPI / resources: call acpi_get_override_irq() only for legacy IRQ resources

acpi_get_override_irq() was added because there was a problem with
buggy BIOSes passing wrong IRQ() resource for the RTC IRQ.  The
commit that added the workaround was 61fd47e0c8476 (ACPI: fix two
IRQ8 issues in IOAPIC mode).

With ACPI 5 enumerated devices there are typically one or more
extended IRQ resources per device (and these IRQs can be shared).
However, the acpi_get_override_irq() workaround forces all IRQs in
range 0 - 15 (the legacy ISA IRQs) to be edge triggered, active high
as can be seen from the dmesg below:

ACPI: IRQ 6 override to edge, high
ACPI: IRQ 7 override to edge, high
ACPI: IRQ 7 override to edge, high
ACPI: IRQ 13 override to edge, high

Also /proc/interrupts for the I2C controllers (INT33C2 and INT33C3) shows
the same thing:

7:          4          0          0          0   IO-APIC-edge INT33C2:00, INT33C3:00

The _CSR method for INT33C2 (and INT33C3) device returns following
resource:

Interrupt (ResourceConsumer, Level, ActiveLow, Shared,,, )
{
0x00000007,
}

which states that this is supposed to be level triggered, active low,
shared IRQ instead.

Fix this by making sure that acpi_get_override_irq() gets only called
when we are dealing with legacy IRQ() or IRQNoFlags() descriptors.

While we are there, correct pr_warning() to print the right triggering
value.

This change turns out to be necessary to make DMA work correctly on
systems based on the Intel Lynxpoint PCH (Platform Controller Hub).

[rjw: Changelog]
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: 3.9+ <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agox86: Fix section mismatch on load_ucode_ap
Paul Gortmaker [Wed, 19 Jun 2013 15:15:26 +0000 (11:15 -0400)]
x86: Fix section mismatch on load_ucode_ap

We are in the process of removing all the __cpuinit annotations.
While working on making that change, an existing problem was
made evident:

  WARNING: arch/x86/kernel/built-in.o(.text+0x198f2): Section mismatch
  in reference from the function cpu_init() to the function
  .init.text:load_ucode_ap()   The function cpu_init() references
  the function __init load_ucode_ap().  This is often because cpu_init
  lacks a __init annotation or the annotation of load_ucode_ap is wrong.

This now appears because in my working tree, cpu_init() is no longer
tagged as __cpuinit, and so the audit picks up the mismatch.  The 2nd
hypothesis from the audit is the correct one, as there was an incorrect
__init tag on the prototype in the header (but __cpuinit was used on
the function itself.)

The audit is telling us that the prototype's __init annotation took
effect and the function did land in the .init.text section.  Checking
with objdump on a mainline tree that still has __cpuinit shows that
the __cpuinit on the function takes precedence over the __init on the
prototype, but that won't be true once we make __cpuinit a no-op.

Even though we are removing __cpuinit, we temporarily align both
the function and the prototype on __cpuinit so that the changeset
can be applied to stable trees  if desired.

[ hpa: build fix only, no object code change ]

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: stable <stable@vger.kernel.org> # 3.9+
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Link: http://lkml.kernel.org/r/1371654926-11729-1-git-send-email-paul.gortmaker@windriver.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoACPI / PM: Rework and clean up acpi_dev_pm_get_state()
Rafael J. Wysocki [Sat, 15 Jun 2013 22:37:59 +0000 (00:37 +0200)]
ACPI / PM: Rework and clean up acpi_dev_pm_get_state()

The acpi_dev_pm_get_state() function defined in device_pm.c is quite
convoluted, which isn't really necessary, and it doesn't validate the
values returned by the ACPI methods executed by it appropriately.

To address these shortcomings modify it in the following way.

 (1) Make its return value only mean whether or not it succeeded and
     pass the device power states determined by it through pointers.

 (2) Drop the d_max_in argument, used by only one of its callers,
     from it, and move the code related to d_max_in into that caller,
     acpi_pm_device_sleep_state().

 (3) Make it always check the return value of acpi_evaluate_integer()
     and handle failures as appropriate.  Moreover, make it check if
     the values returned by the executed ACPI methods are not out of
     range.

 (4) Make it check if the values returned by the executed ACPI
     methods represent valid power states of the given device and
     handle situations in which that's not the case gracefully.

Also update the kerneldoc comments of acpi_dev_pm_get_state() and
acpi_pm_device_sleep_state() to reflect the code changes.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c
Rafael J. Wysocki [Sat, 15 Jun 2013 22:37:50 +0000 (00:37 +0200)]
ACPI / PM: Replace ACPI_STATE_D3 with ACPI_STATE_D3_COLD in device_pm.c

The two symbols ACPI_STATE_D3 and ACPI_STATE_D3_COLD actually
represent the same number (4), but ACPI_STATE_D3 is slightly
ambigugous, because it may not be clear that it really means D3cold
and not D3hot at first sight.

Remove that ambiguity from drivers/acpi/device_pm.c by making it
use ACPI_STATE_D3_COLD everywhere instead of ACPI_STATE_D3.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / PM: Rename function acpi_device_power_state() and make it static
Rafael J. Wysocki [Sat, 15 Jun 2013 22:37:42 +0000 (00:37 +0200)]
ACPI / PM: Rename function acpi_device_power_state() and make it static

There is a name clash between function acpi_device_power_state()
defined in drivers/acpi/device_pm.c and structure type
acpi_device_power_state defined in include/acpi/acpi_bus.h, which
may be resolved by renaming the function.  Additionally, that
funtion may be made static, because it is not used anywhere outside
of the file it is defined in.

Rename acpi_device_power_state() to acpi_dev_pm_get_state(), which
better reflects its purpose, and make it static.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / PM: acpi_processor_suspend() can be static
Fengguang Wu [Mon, 10 Jun 2013 22:55:10 +0000 (00:55 +0200)]
ACPI / PM: acpi_processor_suspend() can be static

Since acpi_processor_suspend() and acpi_processor_resume() need not
be visible outside of the file they are defined in, make them
static.

[rjw: Changelog]
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoxen / ACPI / sleep: Register an acpi_suspend_lowlevel callback.
Konrad Rzeszutek Wilk [Tue, 14 May 2013 17:46:12 +0000 (17:46 +0000)]
xen / ACPI / sleep: Register an acpi_suspend_lowlevel callback.

We piggyback on "x86/acpi: Provide registration for acpi_suspend_lowlevel."
to register a Xen version of the callback. The callback does not
do anything special - except it omits the x86_acpi_suspend_lowlevel.

This is necessary b/c during suspend the generic code tries to write
cr3 values that clashes with what the hypervisor has set up for the guest.

Signed-off-by: Liang Tang <liang.tang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Ben Guthro <benjamin.guthro@citrix.com>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agox86 / ACPI / sleep: Provide registration for acpi_suspend_lowlevel.
Konrad Rzeszutek Wilk [Tue, 14 May 2013 17:09:16 +0000 (17:09 +0000)]
x86 / ACPI / sleep: Provide registration for acpi_suspend_lowlevel.

Which by default will be x86_acpi_suspend_lowlevel.
This registration allows us to register another callback
if there is a need to use another platform specific callback.

Signed-off-by: Liang Tang <liang.tang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Ben Guthro <benjamin.guthro@citrix.com>
Acked-by: "H. Peter Anvin" <hpa@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI: Remove unused flags in acpi_device_flags
Toshi Kani [Tue, 4 Jun 2013 21:56:25 +0000 (21:56 +0000)]
ACPI: Remove unused flags in acpi_device_flags

suprise_removal_ok and performance_manageable in struct
acpi_device_flags are not used by any code.  So, remove
them.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI: Remove useless initializers
Bjorn Helgaas [Mon, 3 Jun 2013 18:20:24 +0000 (18:20 +0000)]
ACPI: Remove useless initializers

These local variables are all initialized at their first use, so there's
no point in initializing them earlier.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / battery: Make sure all spaces are in correct places
Nicholas Mazzuca [Wed, 8 May 2013 23:11:15 +0000 (23:11 +0000)]
ACPI / battery: Make sure all spaces are in correct places

Add or remove spaces that give errors or warnings from checkpatch.pl.

Signed-off-by: Nicholas Mazzuca <nicholas@mazzucastuff.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI: add _STA evaluation at do_acpi_find_child()
Jeff Wu [Wed, 29 May 2013 06:31:30 +0000 (06:31 +0000)]
ACPI: add _STA evaluation at do_acpi_find_child()

Once do_acpi_find_child() has found the first matching handle, it
makes the acpi_get_child() loop stop and return that handle.  On some
platforms, though, there are multiple devices with the same value of
"_ADR" in the same namespace scope, and if one of them is enabled,
the others will be disabled.  For example:

 Address : 0x1FFFF ; path : SB_PCI0.SATA.DEV0
 Address : 0x1FFFF ; path : SB_PCI0.SATA.DEV1
 Address : 0x1FFFF ; path : SB_PCI0.SATA.DEV2

If DEV0 and DEV1 are disabled and DEV2 is enabled, the handle of DEV2
should be returned, but actually the function always returns the
handle of DEV0.

To address that issue, make do_acpi_find_child() evaluate _STA to
check the device status.  If a matching device object exists, but is
disabled, acpi_get_child() will continue to walk the namespace in the
hope of finding an enabled one.  If one is found, its handle will be
returned, but otherwise the function will return the handle of the
disabled object found before (in case it is enabled going forward).

[rjw: Changelog]
Signed-off-by: Jeff Wu <zlinuxkernel@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / EC: access user space with get_user()/put_user()
Vasiliy Kulikov [Wed, 22 May 2013 12:59:11 +0000 (14:59 +0200)]
ACPI / EC: access user space with get_user()/put_user()

User space pointer may not be dereferenced. Use get_user()/put_user()
instead and check their return codes.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agomn10300: Fix include dependency in irqflags.h et al.
David Daney [Mon, 17 Jun 2013 15:46:07 +0000 (08:46 -0700)]
mn10300: Fix include dependency in irqflags.h et al.

We need to pick up the definition of raw_smp_processor_id() from
asm/smp.h.  For the !SMP case, we need to supply a definition of
raw_smp_processor_id().

Because of the include dependencies we cannot use smp_call_func_t in
asm/smp.h, but we do need linux/thread_info.h

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Wed, 19 Jun 2013 16:24:50 +0000 (06:24 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
 "Various sparc bug fixes, in particular:

  1) TSB hashes have to be flushed before TLB on sparc64, from Dave
     Kleikamp.

  2) LEON timer interrupts can get stuck, from Andreas Larsson.

  3) Sparc64 needs to handle lack of address-congruence devicetree
     property, from Bob Picco"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: tsb must be flushed before tlb
  sparc,leon: Convert to use devm_ioremap_resource
  sparc64 address-congruence property
  sparc32, leon: Enable interrupts before going idle to avoid getting stuck
  sparc32, leon: Remove separate "ticker" timer for SMP
  sparc: kernel: using strlcpy() instead of strcpy()
  arch: sparc: prom: looping issue, need additional length check in the outside looping
  sparc: remove inline marking of EXPORT_SYMBOL functions
  sparc: Switch to asm-generic/linkage.h

11 years agoMerge branch 'parisc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Wed, 19 Jun 2013 16:23:56 +0000 (06:23 -1000)]
Merge branch 'parisc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:
 "This contains a kernel segfault fix when reading /proc/kpageflags or
  /proc/kpagecount, two fixes for the serial port and PCI graphic card
  support on C8000 workstations and a fix to use unshadowed registers
  for flushing D- and I-caches."

* 'parisc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Use unshadowed index register for flush instructions in flush_dcache_page_asm and flush_icache_page_asm
  parisc: provide pci_mmap_page_range() for parisc
  parisc: fix serial ports on C8000 workstation
  parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 (part 2)

11 years agometag: fix mm/hugetlb.c build breakage
James Hogan [Fri, 14 Jun 2013 09:31:01 +0000 (10:31 +0100)]
metag: fix mm/hugetlb.c build breakage

Commit 106c992a5ebe ("mm/hugetlb: add more arch-defined huge_pte
functions") added an include of <asm-generic/hugetlb.h> to each
architecture's <asm/hugetlb.h> (except s390).  Unfortunately metag was
missed which resulted in build errors when hugetlbfs is enabled (see
below).

Add the include for metag too to fix the build errors:

  mm/hugetlb.c In function 'make_huge_pte':
  mm/hugetlb.c +2250 : error: implicit declaration of function 'huge_pte_mkwrite'
  mm/hugetlb.c +2250 : error: implicit declaration of function 'huge_pte_mkdirty'
  ...

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Linus Torvalds [Wed, 19 Jun 2013 16:19:46 +0000 (06:19 -1000)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm

Pull ARM fixes from Russell King:
 "The larger changes this time are

   - "ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page"
     which fixes more data corruption problems with O_DIRECT

   - "ARM: 7759/1: decouple CPU offlining from reboot/shutdown" which
     gets us back to working shutdown/reboot on SMP platforms

   - "ARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect"
     which fixes a shutdown regression found in v3.10 on Versatile
     Express platforms.

  The remainder are the quite small, maybe one or two line changes"

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7759/1: decouple CPU offlining from reboot/shutdown
  ARM: 7756/1: zImage/virt: remove hyp-stub.S during distclean
  ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page
  ARM: 7754/1: Fix the CPU ID and the mask associated to the PJ4B
  ARM: 7753/1: map_init_section flushes incorrect pmd
  ARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect

11 years ago[media] exynos4-is: Fix FIMC-IS clocks initialization
Sylwester Nawrocki [Fri, 14 Jun 2013 13:44:30 +0000 (10:44 -0300)]
[media] exynos4-is: Fix FIMC-IS clocks initialization

The ISP clock register content is not preserved over the ISP power domain
off/on cycle. Instead of setting the clock frequencies once at probe time
the clock rates set up is moved to the runtime_resume handler, which is
invoked after the related power domain is already enabled, ensuring the
clocks are properly configured when the device is actively used.
This fixes the FIMC-IS malfunctions and STREAM ON timeout errors accuring
on some boards:
[ 59.860000] fimc_is_general_irq_handler:583 ISR_NDONE: 5: 0x800003e8, IS_ERROR_UNKNOWN
[ 59.860000] fimc_is_general_irq_handler:586 IS_ERROR_TIME_OUT

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agotracing/context-tracking: Add preempt_schedule_context() for tracing
Steven Rostedt [Fri, 24 May 2013 19:23:40 +0000 (15:23 -0400)]
tracing/context-tracking: Add preempt_schedule_context() for tracing

Dave Jones hit the following bug report:

 ===============================
 [ INFO: suspicious RCU usage. ]
 3.10.0-rc2+ #1 Not tainted
 -------------------------------
 include/linux/rcupdate.h:771 rcu_read_lock() used illegally while idle!
 other info that might help us debug this:
 RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 0
 RCU used illegally from extended quiescent state!
 2 locks held by cc1/63645:
  #0:  (&rq->lock){-.-.-.}, at: [<ffffffff816b39fd>] __schedule+0xed/0x9b0
  #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff8109d645>] cpuacct_charge+0x5/0x1f0

 CPU: 1 PID: 63645 Comm: cc1 Not tainted 3.10.0-rc2+ #1 [loadavg: 40.57 27.55 13.39 25/277 64369]
 Hardware name: Gigabyte Technology Co., Ltd. GA-MA78GM-S2H/GA-MA78GM-S2H, BIOS F12a 04/23/2010
  0000000000000000 ffff88010f78fcf8 ffffffff816ae383 ffff88010f78fd28
  ffffffff810b698d ffff88011c092548 000000000023d073 ffff88011c092500
  0000000000000001 ffff88010f78fd60 ffffffff8109d7c5 ffffffff8109d645
 Call Trace:
  [<ffffffff816ae383>] dump_stack+0x19/0x1b
  [<ffffffff810b698d>] lockdep_rcu_suspicious+0xfd/0x130
  [<ffffffff8109d7c5>] cpuacct_charge+0x185/0x1f0
  [<ffffffff8109d645>] ? cpuacct_charge+0x5/0x1f0
  [<ffffffff8108dffc>] update_curr+0xec/0x240
  [<ffffffff8108f528>] put_prev_task_fair+0x228/0x480
  [<ffffffff816b3a71>] __schedule+0x161/0x9b0
  [<ffffffff816b4721>] preempt_schedule+0x51/0x80
  [<ffffffff816b4800>] ? __cond_resched_softirq+0x60/0x60
  [<ffffffff816b6824>] ? retint_careful+0x12/0x2e
  [<ffffffff810ff3cc>] ftrace_ops_control_func+0x1dc/0x210
  [<ffffffff816be280>] ftrace_call+0x5/0x2f
  [<ffffffff816b681d>] ? retint_careful+0xb/0x2e
  [<ffffffff816b4805>] ? schedule_user+0x5/0x70
  [<ffffffff816b4805>] ? schedule_user+0x5/0x70
  [<ffffffff816b6824>] ? retint_careful+0x12/0x2e
 ------------[ cut here ]------------

What happened was that the function tracer traced the schedule_user() code
that tells RCU that the system is coming back from userspace, and to
add the CPU back to the RCU monitoring.

Because the function tracer does a preempt_disable/enable_notrace() calls
the preempt_enable_notrace() checks the NEED_RESCHED flag. If it is set,
then preempt_schedule() is called. But this is called before the user_exit()
function can inform the kernel that the CPU is no longer in user mode and
needs to be accounted for by RCU.

The fix is to create a new preempt_schedule_context() that checks if
the kernel is still in user mode and if so to switch it to kernel mode
before calling schedule. It also switches back to user mode coming back
from schedule in need be.

The only user of this currently is the preempt_enable_notrace(), which is
only used by the tracing subsystem.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1369423420.6828.226.camel@gandalf.local.home
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agosched: Fix clear NOHZ_BALANCE_KICK
Vincent Guittot [Wed, 5 Jun 2013 08:13:11 +0000 (10:13 +0200)]
sched: Fix clear NOHZ_BALANCE_KICK

I have faced a sequence where the Idle Load Balance was sometime not
triggered for a while on my platform, in the following scenario:

 CPU 0 and CPU 1 are running tasks and CPU 2 is idle

 CPU 1 kicks the Idle Load Balance
 CPU 1 selects CPU 2 as the new Idle Load Balancer
 CPU 2 sets NOHZ_BALANCE_KICK for CPU 2
 CPU 2 sends a reschedule IPI to CPU 2

 While CPU 3 wakes up, CPU 0 or CPU 1 migrates a waking up task A on CPU 2

 CPU 2 finally wakes up, runs task A and discards the Idle Load Balance
       task A quickly goes back to sleep (before a tick occurs on CPU 2)
 CPU 2 goes back to idle with NOHZ_BALANCE_KICK set

Whenever CPU 2 will be selected as the ILB, no reschedule IPI will be sent
because NOHZ_BALANCE_KICK is already set and no Idle Load Balance will be
performed.

We must wait for the sched softirq to be raised on CPU 2 thanks to another
part the kernel to come back to clear NOHZ_BALANCE_KICK.

The proposed solution clears NOHZ_BALANCE_KICK in schedule_ipi if
we can't raise the sched_softirq for the Idle Load Balance.

Change since V1:

- move the clear of NOHZ_BALANCE_KICK in got_nohz_idle_kick if the ILB
  can't run on this CPU (as suggested by Peter)

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1370419991-13870-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agoperf/x86: Fix broken PEBS-LL support on SNB-EP/IVB-EP
Stephane Eranian [Fri, 7 Jun 2013 21:22:10 +0000 (23:22 +0200)]
perf/x86: Fix broken PEBS-LL support on SNB-EP/IVB-EP

This patch fixes broken support of PEBS-LL on SNB-EP/IVB-EP.
For some reason, the LDLAT extra reg definition for snb_ep
showed up as duplicate in the snb table.

This patch moves the definition of LDLAT back into the
snb_ep table.

Thanks to Don Zickus for tracking this one down.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130607212210.GA11849@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agoperf: Fix mmap() accounting hole
Peter Zijlstra [Tue, 4 Jun 2013 08:44:21 +0000 (10:44 +0200)]
perf: Fix mmap() accounting hole

Vince's fuzzer once again found holes. This time it spotted a leak in
the locked page accounting.

When an event had redirected output and its close() was the last
reference to the buffer we didn't have a vm context to undo accounting.

Change the code to destroy the buffer on the last munmap() and detach
all redirected events at that time. This provides us the right context
to undo the vm accounting.

Reported-and-tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20130604084421.GI8923@twins.programming.kicks-ass.net
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
11 years agox86: kvmclock: zero initialize pvclock shared memory area
Igor Mammedov [Mon, 10 Jun 2013 16:31:11 +0000 (18:31 +0200)]
x86: kvmclock: zero initialize pvclock shared memory area

kernel might hung in pvclock_clocksource_read() due to
uninitialized memory might contain odd version value in
following cycle:

        do {
                version = __pvclock_read_cycles(src, &ret, &flags);
        } while ((src->version & 1) || version != src->version);

if secondary kvmclock is accessed before it's registered with kvm.

Clear garbage in pvclock shared memory area right after it's
allocated to avoid this issue.

Ref: https://bugzilla.kernel.org/show_bug.cgi?id=59521
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
[See BZ for analysis.  We may want a different fix for 3.11, but
 this is the safest for now - Paolo]
Cc: <stable@vger.kernel.org> # 3.8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agokvm/ppc/booke: Delay kvmppc_lazy_ee_enable
Scott Wood [Tue, 11 Jun 2013 16:38:31 +0000 (11:38 -0500)]
kvm/ppc/booke: Delay kvmppc_lazy_ee_enable

kwmppc_lazy_ee_enable() should be called as late as possible,
or else we get things like WARN_ON(preemptible()) in enable_kernel_fp()
in configurations where preemptible() works.

Note that book3s_pr already waits until just before __kvmppc_vcpu_run
to call kvmppc_lazy_ee_enable().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agosparc: tsb must be flushed before tlb
Dave Kleikamp [Tue, 18 Jun 2013 14:05:36 +0000 (09:05 -0500)]
sparc: tsb must be flushed before tlb

This fixes a race where a cpu may re-load a tlb from a stale tsb right
after it has been flushed by a remote function call.

I still see some instability when stressing the system with parallel
kernel builds while creating memory pressure by writing to
/proc/sys/vm/nr_hugepages, but this patch improves the stability
significantly.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Acked-by: Bob Picco <bob.picco@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc,leon: Convert to use devm_ioremap_resource
Tushar Behera [Mon, 17 Jun 2013 09:07:44 +0000 (14:37 +0530)]
sparc,leon: Convert to use devm_ioremap_resource

Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

While at it, also remove the error message as devm_ioremap_resource()
also prints similar error message.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: sparclinux@vger.kernel.org
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc64 address-congruence property
bob picco [Tue, 11 Jun 2013 18:54:51 +0000 (14:54 -0400)]
sparc64 address-congruence property

The Machine Description (MD) property "address-congruence-offset" is
optional. According to the MD specification the value is assumed 0UL when
not present. This caused early boot failure on T5.

Signed-off-by: Bob Picco <bob.picco@oracle.com>
CC: sparclinux@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc32, leon: Enable interrupts before going idle to avoid getting stuck
Andreas Larsson [Mon, 10 Jun 2013 06:56:41 +0000 (08:56 +0200)]
sparc32, leon: Enable interrupts before going idle to avoid getting stuck

This enables interrupts for Leon before having the CPU enter power-down mode.

Commit 87fa05aeb3a5e8e21b1a5510eef6983650eff092, "sparc: Use generic idle loop",
gets the CPU stuck on idle for Leon systems. On Leon, disabling interrupts and
powering down the processor will get the processor stuck waiting for an
interrupt that will never be reacted to.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc32, leon: Remove separate "ticker" timer for SMP
Andreas Larsson [Mon, 10 Jun 2013 06:53:28 +0000 (08:53 +0200)]
sparc32, leon: Remove separate "ticker" timer for SMP

This reduces the need from two timers to one timer.

Moreover, without this patch, when the "ticker" timer triggers timer_cs_read via
tick_periodic it reads the value of the usual timer it can get an wrapped timer
value without timer_cs_internal_counter having been updated leading to the clock
going backwards. This effectively hangs one cpu that gets stuck in
update_wall_time with an offset slightly smaller than 0xffffffffffffffff.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc: kernel: using strlcpy() instead of strcpy()
Zhao Hongjiang [Sun, 9 Jun 2013 08:57:58 +0000 (16:57 +0800)]
sparc: kernel: using strlcpy() instead of strcpy()

'boot_command_line' and 'full_boot_str' has a fix length, 'cmdline_p' and
'boot_command' maybe larger than them. So use strlcpy() instead of strcpy()
to avoid memory overflow.

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoarch: sparc: prom: looping issue, need additional length check in the outside looping
Chen Gang [Thu, 30 May 2013 03:35:22 +0000 (11:35 +0800)]
arch: sparc: prom: looping issue, need additional length check in the outside looping

When "cp >= barg_buf + BARG_LEN-2", it breaks internel looping 'while',
but outside loop 'for' still has effect, so "*cp++ = ' '" will continue
repeating which may cause memory overflow.

So need additional length check for it in the outside looping.

Also beautify the related code which found by "./scripts/checkpatch.pl"

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc: remove inline marking of EXPORT_SYMBOL functions
Denis Efremov [Thu, 9 May 2013 10:36:54 +0000 (14:36 +0400)]
sparc: remove inline marking of EXPORT_SYMBOL functions

EXPORT_SYMBOL and inline directives are contradictory to each other.
The patch fixes this inconsistency.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosparc: Switch to asm-generic/linkage.h
Geert Uytterhoeven [Tue, 7 May 2013 09:55:55 +0000 (11:55 +0200)]
sparc: Switch to asm-generic/linkage.h

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomconsole: we'd better initialize pos before passing it to vfs_read()...
Al Viro [Wed, 19 Jun 2013 08:35:42 +0000 (12:35 +0400)]
mconsole: we'd better initialize pos before passing it to vfs_read()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoMerge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Wed, 19 Jun 2013 01:48:36 +0000 (11:48 +1000)]
Merge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Alex writes:
Remove some harmless but confusing VM related error messages
fix a regression with suspend and UVD,
fix UVD on big endian.

* 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: fix UVD on big endian
  drm/radeon: fix write back suspend regression with uvd v2
  drm/radeon: do not try to uselessly update virtual memory pagetable

11 years agodrm/prime: Honor requested file flags when exporting a buffer
Laurent Pinchart [Wed, 19 Jun 2013 01:14:20 +0000 (03:14 +0200)]
drm/prime: Honor requested file flags when exporting a buffer

The DRM PRIME API passes file flags to the driver for the exported
buffer. Honor them instead of hardcoding 0600.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'cpufreq-kconfig-fixes' of git://git.linaro.org/people/vireshk/linux...
Rafael J. Wysocki [Wed, 19 Jun 2013 00:24:46 +0000 (02:24 +0200)]
Merge branch 'cpufreq-kconfig-fixes' of git://git.linaro.org/people/vireshk/linux into pm-cpufreq-Kconfig

Pull cpufreq Kconfig fixes from Viresh Kumar.

* 'cpufreq-kconfig-fixes' of git://git.linaro.org/people/vireshk/linux:
  cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
  cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
  cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
  cpufreq: pxa: select CPU_FREQ_TABLE
  cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE
  cpufreq: imx: select CPU_FREQ_TABLE
  cpufreq: highbank: remove select CPU_FREQ_TABLE
  cpufreq: exynos: select CPU_FREQ_TABLE
  cpufreq: davinci: select CPU_FREQ_TABLE
  cpufreq: cris: select CPU_FREQ_TABLE
  cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ

11 years agocpufreq: Simplify userspace governor
Viresh Kumar [Wed, 5 Jun 2013 06:17:38 +0000 (11:47 +0530)]
cpufreq: Simplify userspace governor

Userspace governor has got more code than what it needs for its
functioning, so simplify it.

Portions of code removed are:
 - Extra header files which aren't required anymore (rearrange them
   as well).
 - cpu_{max|min|cur|set}_freq, as they are always the same as
   policy->{max|min|cur}.
 - userspace_cpufreq_notifier_block as we don't need to set
   cpu_cur_freq anymore.
 - cpus_using_userspace_governor as it was for the notifier code.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / LPSS: override SDIO private register space size from ACPI tables
Mika Westerberg [Tue, 18 Jun 2013 13:51:35 +0000 (16:51 +0300)]
ACPI / LPSS: override SDIO private register space size from ACPI tables

The SDIO device in Lynxpoint has its LTR registers reserved for a
WiFi device (a child of the SDIO device) in the ACPI namespace even
though those registers physically belong to the SDIO device itself.
In order to be able to access the SDIO LTR registers from the ACPI
LPSS driver for diagnostic purposes we need to use a size override
for the SDIO private register space.

Add a possibility to override the size of the private register space
of an LPSS device provided by the ACPI tables in the ACPI LPSS driver
and set the correct size for the SDIO device in there.

[rjw: Changelog]
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / LPSS: mask the UART TX completion interrupt
Heikki Krogerus [Mon, 17 Jun 2013 10:25:46 +0000 (13:25 +0300)]
ACPI / LPSS: mask the UART TX completion interrupt

Intel LPSS provides an extra TX byte counter and an extra TX
completion interrupt for some of its bus controllers.  However,
there is no use for the extra UART interrupt and it has to be
masked out during initialization.

Otherwise, if the firmware does not mask the interrupt and
the driver does not clear it, it may cause an interrupt flood
freezing the board to happen.

Add code masking that problematic interrupt to the ACPI LPSS driver.

[rjw: Changelog]
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI / LPSS: add support for Intel BayTrail
Mika Westerberg [Mon, 13 May 2013 12:42:44 +0000 (12:42 +0000)]
ACPI / LPSS: add support for Intel BayTrail

Intel BayTrail has almost the same Low Power Subsystem than Lynxpoint with
few differences. Peripherals are clocked with different speeds (typically
lower) and the clock is not always gated. To support this we add
possibility to share a common fixed rate clock and make clock gating
optional.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agoACPI: Do not use CONFIG_ACPI_HOTPLUG_MEMORY_MODULE
Toshi Kani [Tue, 18 Jun 2013 21:06:45 +0000 (15:06 -0600)]
ACPI: Do not use CONFIG_ACPI_HOTPLUG_MEMORY_MODULE

CONFIG_ACPI_HOTPLUG_MEMORY has been changed to bool (y/n), and
its module option is no longer valid.  So, stop using
CONFIG_ACPI_HOTPLUG_MEMORY_MODULE.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agox86: fix build error and kconfig for ia32_emulation and binfmt
Randy Dunlap [Tue, 18 Jun 2013 19:33:40 +0000 (12:33 -0700)]
x86: fix build error and kconfig for ia32_emulation and binfmt

Fix kconfig warning and build errors on x86_64 by selecting BINFMT_ELF
when COMPAT_BINFMT_ELF is being selected.

warning: (IA32_EMULATION) selects COMPAT_BINFMT_ELF which has unmet direct dependencies (COMPAT && BINFMT_ELF)

fs/built-in.o: In function `elf_core_dump':
compat_binfmt_elf.c:(.text+0x3e093): undefined reference to `elf_core_extra_phdrs'
compat_binfmt_elf.c:(.text+0x3ebcd): undefined reference to `elf_core_extra_data_size'
compat_binfmt_elf.c:(.text+0x3eddd): undefined reference to `elf_core_write_extra_phdrs'
compat_binfmt_elf.c:(.text+0x3f004): undefined reference to `elf_core_write_extra_data'

[ hpa: This was sent to me for -next but it is a low risk build fix ]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: http://lkml.kernel.org/r/51C0B614.5000708@infradead.org
Cc: <stable@vger.kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoparisc: Use unshadowed index register for flush instructions in flush_dcache_page_asm...
John David Anglin [Sun, 2 Jun 2013 16:21:48 +0000 (12:21 -0400)]
parisc: Use unshadowed index register for flush instructions in flush_dcache_page_asm and flush_icache_page_asm

The comment at the start of pacache.S states that the base and index
registers used for fdc,fic, and pdc instructions should not use shadowed
registers. Although this is probably unnecessary for tmpalias flushes,
there is also no reason not to comply.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
11 years agoparisc: provide pci_mmap_page_range() for parisc
Thomas Bogendoerfer [Fri, 14 Jun 2013 07:05:41 +0000 (09:05 +0200)]
parisc: provide pci_mmap_page_range() for parisc

pci_mmap_page_range() is needed for X11-server support on C8000 with ATI
FireGL card.

Signed-off-by Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Helge Deller <deller@gmx.de>
11 years agoparisc: fix serial ports on C8000 workstation
Thomas Bogendoerfer [Sun, 9 Jun 2013 21:00:21 +0000 (23:00 +0200)]
parisc: fix serial ports on C8000 workstation

The C8000 workstation (64 bit kernel only) has a somewhat different
serial port configuration than other models.
Thomas Bogendoerfer sent a patch to fix this in September 2010, which
was now minimally modified by me.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Helge Deller <deller@gmx.de>
11 years agoparisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 (part 2)
Helge Deller [Wed, 5 Jun 2013 20:50:01 +0000 (20:50 +0000)]
parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50 (part 2)

Make sure that we really return -1 (instead of 0x00ff) as node id for
page frame numbers which are not physically available.

This finally fixes the kernel panic when running
cat /proc/kpageflags /proc/kpagecount.

Theoretically this patch now limits the number of physical memory ranges
to 127 instead of 254, but currently we have MAX_PHYSMEM_RANGES
hardcoded to 8 which is sufficient for all existing parisc machines.

Signed-off-by: Helge Deller <deller@gmx.de>
11 years agofirmware loader: fix use-after-free by double abort
Ming Lei [Sat, 15 Jun 2013 08:36:38 +0000 (16:36 +0800)]
firmware loader: fix use-after-free by double abort

fw_priv->buf is accessed in both request_firmware_load() and
writing to sysfs file of 'loading' context, but not protected
by 'fw_lock' entirely. The patch makes sure that access on
'fw_priv->buf' is protected by the lock.

So fixes the double abort problem reported by nirinA raseliarison:

http://lkml.org/lkml/2013/6/14/188

Reported-and-tested-by: nirinA raseliarison <nirina.raseliarison@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable <stable@vger.kernel.org> # 3.9
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: phy: Improve Kconfig help for CONFIG_USB_PHY
George Spelvin [Mon, 17 Jun 2013 05:45:50 +0000 (01:45 -0400)]
usb: phy: Improve Kconfig help for CONFIG_USB_PHY

The previous text confused users by not describing the very common
(e.g. x86 PC) sitations where no PHY driver is necessary.

Signed-off-by: George Spelvin <linux@horizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agorange: Do not add new blank slot with add_range_with_merge
Yinghai Lu [Thu, 13 Jun 2013 20:17:02 +0000 (13:17 -0700)]
range: Do not add new blank slot with add_range_with_merge

Joshua reported: Commit cd7b304dfaf1 (x86, range: fix missing merge
during add range) broke mtrr cleanup on his setup in 3.9.5.
corresponding commit in upstream is fbe06b7bae7c.

The reason is add_range_with_merge could generate blank spot.

We could avoid that by searching new expanded start/end, that
new range should include all connected ranges in range array.
At last add the new expanded start/end to the range array.
Also move up left array so do not add new blank slot in the
range array.

-v2: move left array to avoid enhance add_range()
-v3: include fix from Joshua about memmove declaring when
     DYN_DEBUG is used.

Reported-by: Joshua Covington <joshuacov@googlemail.com>
Tested-by: Joshua Covington <joshuacov@googlemail.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1371154622-8929-3-git-send-email-yinghai@kernel.org
Cc: <stable@vger.kernel.org> v3.9
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agox86, mtrr: Fix original mtrr range get for mtrr_cleanup
Yinghai Lu [Thu, 13 Jun 2013 20:17:01 +0000 (13:17 -0700)]
x86, mtrr: Fix original mtrr range get for mtrr_cleanup

Joshua reported: Commit cd7b304dfaf1 (x86, range: fix missing merge
during add range) broke mtrr cleanup on his setup in 3.9.5.
corresponding commit in upstream is fbe06b7bae7c.

  *BAD*gran_size: 64K chunk_size: 16M num_reg: 6 lose cover RAM: -0G

https://bugzilla.kernel.org/show_bug.cgi?id=59491

So it rejects new var mtrr layout.

It turns out we have some problem with initial mtrr range retrieval.
The current sequence is:
x86_get_mtrr_mem_range
==> bunchs of add_range_with_merge
==> bunchs of subract_range
==> clean_sort_range
add_range_with_merge for [0,1M)
sort_range()

add_range_with_merge could have blank slots, so we can not just
sort only, that will have final result have extra blank slot in head.

So move that calling add_range_with_merge for [0,1M), with that we
could avoid extra clean_sort_range calling.

Reported-by: Joshua Covington <joshuacov@googlemail.com>
Tested-by: Joshua Covington <joshuacov@googlemail.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1371154622-8929-2-git-send-email-yinghai@kernel.org
Cc: <stable@vger.kernel.org> v3.9
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoMerge tag 'please-pull-fixia64' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 18 Jun 2013 16:29:19 +0000 (06:29 -1000)]
Merge tag 'please-pull-fixia64' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

Pull ia64 build fix from Tony Luck:
 "Fix ia64 build breakage by adding newly needed #include"

We're still debating the patch that caused the build breakage, but this
fix seems like a good idea regardless of how that ends up being handled.

* tag 'please-pull-fixia64' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  [IA64] Fix include dependency in asm/irqflags.h

11 years agoMerge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Tue, 18 Jun 2013 16:27:47 +0000 (06:27 -1000)]
Merge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux

Pull SLAB fix from Pekka Enberg:
 "A slab regression fix by Sasha Levin"

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
  slab: prevent warnings when allocating with __GFP_NOWARN

11 years agoMerge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Tue, 18 Jun 2013 16:26:14 +0000 (06:26 -1000)]
Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Only driver/device-specific small fixes that are pretty safe to apply:

   - USB-audio Android and Logitech webcam fixes
   - HD-audio MacBook Air 4,2 quirk
   - Complete Dell headset quirk entries that were introduced in 3.10"

* tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Add models for Dell headset jacks
  ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
  ALSA: hda - Fix pin configurations for MacBook Air 4,2
  ALSA: usb-audio: work around Android accessory firmware bug
  ALSA: hda - Headset mic support for three more machines

11 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Tue, 18 Jun 2013 16:25:08 +0000 (06:25 -1000)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "Series of fixes for 3.10.  There are some usual driver fixes (mostly
  on s5p/exynos playform drivers), plus some fixes at V4L2 core"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits)
  [media] soc_camera: error dev remove and v4l2 call
  [media] sh_veu: fix the buffer size calculation
  [media] sh_veu: keep power supply until the m2m context is released
  [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted
  [media] v4l2-ioctl: don't print the clips list
  [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls
  [media] cx88: fix NULL pointer dereference
  [media] DocBook/media/v4l: update version number
  [media] exynos4-is: Remove "sysreg" clock handling
  [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
  [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
  [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded
  [media] s5p-mfc: Add NULL check for allocated buffer
  [media] s5p-mfc: added missing end-of-lines in debug messages
  [media] s5p-mfc: v4l2 controls setup routine moved to initialization code
  [media] s5p-mfc: separate encoder parameters for h264 and mpeg4
  [media] s5p-mfc: Remove special clock usage in driver
  [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function
  [media] v4l2: mem2mem: save irq flags correctly
  [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
  ...

11 years agoMerge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux
Linus Torvalds [Tue, 18 Jun 2013 16:23:51 +0000 (06:23 -1000)]
Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux

Pull clock framework fixes from Mike Turquette:
 "Half of the fixes here are for Exynos5, fixing regressions in CPUfreq
  due to the common clock framework conversion as well as one fix which
  allows the platform to properly reboot again.

  One core framework fix patches up a memory leak, another fixes a build
  error for the SPEAr platform and finally a Tegra-specific fix allows
  PCIe to initialize properly on that platform again"

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
  ARM: tegra30: clocks: Fix pciex clock registration
  clk: exynos5250: Add CLK_IGNORE_UNUSED flag for pmu clock
  clk: spear: fix build error for spear3xx
  clk: samsung: Fix pll36xx_recalc_rate to handle kdiv properly
  clk: exynos5250: Add sclk_mpll to the parent list of mout_cpu clock
  clk: exynos5250: Update cpufreq related clocks for EXYNOS5250
  clk: remove notifier from list before freeing it

11 years agocpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE

This CPUFreq driver uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Acked-by: Jacob Shin <jacob.shin@amd.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
Viresh Kumar [Wed, 12 Jun 2013 06:35:48 +0000 (12:05 +0530)]
cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ

currently Tegra cpufreq driver gets built based on ARCH_TEGRA, which doesn't
depend on nor select CPU_FREQ itself, so:

        select CPU_FREQ_TABLE if CPU_FREQ

... isn't guaranteed to fire.

The correct solution seems to be:

* Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm.
* Make that Kconfig option selct CPU_FREQ_TABLE.
* Make that Kconfig option be def_bool ARCH_TEGRA.
* Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that.
* Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.

That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's
cpufreq works the same way as all the other cpufreq drivers.

This patch does it.

Suggested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: pxa: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: pxa: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: linuxppc-dev@lists.ozlabs.org
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: imx: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: imx: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: highbank: remove select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:38:44 +0000 (12:08 +0530)]
cpufreq: highbank: remove select CPU_FREQ_TABLE

Highbank cpufreq driver doesn't use any APIs from freq_table.c and so must not
select CPU_FREQ_TABLE.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: exynos: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: exynos: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: davinci: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: davinci: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: cris: select CPU_FREQ_TABLE
Viresh Kumar [Wed, 12 Jun 2013 06:40:41 +0000 (12:10 +0530)]
cpufreq: cris: select CPU_FREQ_TABLE

CPUFreq driver of this platform uses APIs from freq_table.c and so must select
CPU_FREQ_TABLE.

Cc: linux-cris-kernel@axis.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agocpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ
Viresh Kumar [Wed, 12 Jun 2013 06:02:00 +0000 (11:32 +0530)]
cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ

By mistake blackfin's cpufreq driver is enabled when CONFIG_BLACKFIN was
present, whereas it should have been enabled only when CONFIG_BFIN_CPU_FREQ is
present.

Fix it.

Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
11 years agoKVM: x86: remove vcpu's CPL check in host-invoked XCR set
Zhanghaoyu (A) [Fri, 14 Jun 2013 07:36:13 +0000 (07:36 +0000)]
KVM: x86: remove vcpu's CPL check in host-invoked XCR set

__kvm_set_xcr function does the CPL check when set xcr. __kvm_set_xcr is
called in two flows, one is invoked by guest, call stack shown as below,

  handle_xsetbv(or xsetbv_interception)
    kvm_set_xcr
      __kvm_set_xcr

the other one is invoked by host, for example during system reset:

  kvm_arch_vcpu_ioctl
    kvm_vcpu_ioctl_x86_set_xcrs
      __kvm_set_xcr

The former does need the CPL check, but the latter does not.

Cc: stable@vger.kernel.org
Signed-off-by: Zhang Haoyu <haoyu.zhang@huawei.com>
[Tweaks to commit message. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years ago[IA64] Fix include dependency in asm/irqflags.h
David Daney [Sun, 16 Jun 2013 20:06:28 +0000 (13:06 -0700)]
[IA64] Fix include dependency in asm/irqflags.h

asm/kregs.h isn't always included first, so we need an explicit include.

[Fix build breakage introduced by f21afc25f9ed45b8ffe200d0f071b0caec3ed2ef
 smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().]

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
11 years agoARM: 7759/1: decouple CPU offlining from reboot/shutdown
Stephen Warren [Fri, 14 Jun 2013 15:14:14 +0000 (16:14 +0100)]
ARM: 7759/1: decouple CPU offlining from reboot/shutdown

Add comments to machine_shutdown()/halt()/power_off()/restart() that
describe their purpose and/or requirements re: CPUs being active/not.

In machine_shutdown(), replace the call to smp_send_stop() with a call to
disable_nonboot_cpus(). This completely disables all but one CPU, thus
satisfying the requirement that only a single CPU be active for kexec.
Adjust Kconfig dependencies for this change.

In machine_halt()/power_off()/restart(), call smp_send_stop() directly,
rather than via machine_shutdown(); these functions don't need to
completely de-activate all CPUs using hotplug, but rather just quiesce
them.

Remove smp_kill_cpus(), and its call from smp_send_stop().
smp_kill_cpus() was indirectly calling smp_ops.cpu_kill() without calling
smp_ops.cpu_die() on the target CPUs first. At least some implementations
of smp_ops had issues with this; it caused cpu_kill() to hang on Tegra,
for example. Since smp_send_stop() is only used for shutdown, halt, and
power-off, there is no need to attempt any kind of CPU hotplug here.

Adjust Kconfig to reflect that machine_shutdown() (and hence kexec)
relies upon disable_nonboot_cpus(). However, this alone doesn't guarantee
that hotplug will work, or even that hotplug is implemented for a
particular piece of HW that a multi-platform zImage runs on. Hence, add
error-checking to machine_kexec() to determine whether it did work.

Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Zhangfei Gao <zhangfei.gao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agotty: Fix transient pty write() EIO
Peter Hurley [Thu, 13 Jun 2013 19:56:37 +0000 (15:56 -0400)]
tty: Fix transient pty write() EIO

Commit 699390354da6c258b65bf8fa79cfd5feaede50b6
('pty: Ignore slave pty close() if never successfully opened')
introduced a bug with ptys whereby a write() in parallel with an
open() on an existing pty could mistakenly indicate an I/O error.

Only indicate an I/O error if the condition on open() actually exists.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Cc: stable <stable@vger.kernel.org> # 3.9
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agotty/vt: Return EBUSY if deallocating VT1 and it is busy
Ross Lagerwall [Fri, 14 Jun 2013 22:24:25 +0000 (23:24 +0100)]
tty/vt: Return EBUSY if deallocating VT1 and it is busy

Commit 421b40a6286e ("tty/vt: Fix vc_deallocate() lock order") changed
the behavior when deallocating VT 1.  Previously if trying to
deallocate VT1 and it is busy, we would return EBUSY.  The commit
changed this to return 0 (success).

This commit restores the old behavior.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years ago[media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner
Gianluca Gennari [Sun, 2 Jun 2013 20:24:24 +0000 (17:24 -0300)]
[media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner

As suggested by Antti, this patch replaces:
https://patchwork.kernel.org/patch/2649861/
The buffer overflow is fixed by reading only the r820t ID register.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoARM: dts: Correct the base address of pinctrl_3 on Exynos5250
Padmavathi Venna [Wed, 12 Jun 2013 08:23:44 +0000 (13:53 +0530)]
ARM: dts: Correct the base address of pinctrl_3 on Exynos5250

This patch corrects the base address of pinctrl_3 on Exynos5250
platform.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
11 years agoARM: 7756/1: zImage/virt: remove hyp-stub.S during distclean
Magnus Damm [Wed, 12 Jun 2013 09:56:43 +0000 (10:56 +0100)]
ARM: 7756/1: zImage/virt: remove hyp-stub.S during distclean

Make sure hyp-stub.S gets removed during make distclean,
this left over file was introduced in commit:

424e599 ARM: zImage/virt: hyp mode entry support for the zImage loader

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Dave Martin <dave.martin@linaro.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page
Simon Baatz [Mon, 10 Jun 2013 20:10:12 +0000 (21:10 +0100)]
ARM: 7755/1: handle user space mapped pages in flush_kernel_dcache_page

Commit f8b63c1 made flush_kernel_dcache_page a no-op assuming that
the pages it needs to handle are kernel mapped only.  However, for
example when doing direct I/O, pages with user space mappings may
occur.

Thus, continue to do lazy flushing if there are no user space
mappings.  Otherwise, flush the kernel cache lines directly.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@vger.kernel.org> # 3.2+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7754/1: Fix the CPU ID and the mask associated to the PJ4B
Gregory CLEMENT [Mon, 10 Jun 2013 17:05:51 +0000 (18:05 +0100)]
ARM: 7754/1: Fix the CPU ID and the mask associated to the PJ4B

This commit fixes the ID and mask for the PJ4B which was too
restrictive and didn't match the CPU of the Armada 370 SoC.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7753/1: map_init_section flushes incorrect pmd
Po-Yu Chuang [Fri, 7 Jun 2013 11:15:45 +0000 (12:15 +0100)]
ARM: 7753/1: map_init_section flushes incorrect pmd

This bug was introduced in commit e651eab0.
Some v4/v5 platforms failed to boot due to this.

Signed-off-by: Po-Yu Chuang <ratbert.chuang@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect
Jon Medhurst [Fri, 7 Jun 2013 09:35:35 +0000 (10:35 +0100)]
ARM: 7752/1: errata: LoUIS bit field in CLIDR register is incorrect

On Cortex-A9 before version r1p0, the LoUIS bit field of the CLIDR
register returns zero when it should return one. This leads to cache
maintenance operations which rely on this value to not function as
intended, causing data corruption.

The workaround for this errata is to detect affected CPUs and correct
the LoUIS value read.

Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoALSA: hda - Add models for Dell headset jacks
David Henningsson [Mon, 17 Jun 2013 09:04:02 +0000 (11:04 +0200)]
ALSA: hda - Add models for Dell headset jacks

These headset jacks keep coming in on more and more platforms, and
it's possible I don't catch them all. Make it easier to test and
verify by making models.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
Takashi Iwai [Mon, 17 Jun 2013 08:25:02 +0000 (10:25 +0200)]
ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310

Just like the previous fix for LogitechHD Webcam c270 in commit
11e7064f35bb87da8f427d1aa4bbd8b7473a3993, c310 model also requires the
same workaround for avoiding the kernel warning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59741
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Fix pin configurations for MacBook Air 4,2
Takashi Iwai [Mon, 17 Jun 2013 08:19:49 +0000 (10:19 +0200)]
ALSA: hda - Fix pin configurations for MacBook Air 4,2

MacBook Air 4,2 requires the whole default pin configuration table to
be overridden by the driver, as usual, as Apple's machines don't set
up properly after boot.  Otherwise mic won't work, and other ill
effect may happen.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59381
Reported-and-tested-by: Peter John Hartman <peterjohnhartman@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: usb-audio: work around Android accessory firmware bug
Clemens Ladisch [Sat, 15 Jun 2013 09:21:09 +0000 (11:21 +0200)]
ALSA: usb-audio: work around Android accessory firmware bug

When the Android firmware enables the audio interfaces in accessory
mode, it always declares in the control interface's baInterfaceNr array
that interfaces 0 and 1 belong to the audio function.  However, the
accessory interface itself, if also enabled, already is at index 0 and
shifts the actual audio interface numbers to 1 and 2, which prevents the
PCM streaming interface from being seen by the host driver.

To get the PCM interface interface to work, detect when the descriptors
point to the (for this driver useless) accessory interface, and redirect
to the correct one.

Reported-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Tested-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoALSA: hda - Headset mic support for three more machines
David Henningsson [Tue, 11 Jun 2013 09:06:48 +0000 (11:06 +0200)]
ALSA: hda - Headset mic support for three more machines

They need these quirks to have headset mic support.

BugLink: https://bugs.launchpad.net/bugs/1189363
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoARM: tegra30: clocks: Fix pciex clock registration
Jay Agarwal [Wed, 12 Jun 2013 07:13:43 +0000 (12:43 +0530)]
ARM: tegra30: clocks: Fix pciex clock registration

Registering pciex as peripheral clock instead of fixed clock
as tegra_perih_reset_assert(deassert) api of this clock api
gives warning and ultimately does not succeed to assert(deassert)

Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
11 years agolseek(fd, n, SEEK_END) does *not* go to eof - n
Al Viro [Sun, 16 Jun 2013 17:06:06 +0000 (18:06 +0100)]
lseek(fd, n, SEEK_END) does *not* go to eof - n

When you copy some code, you are supposed to read it.  If nothing else,
there's a chance to spot and fix an obvious bug instead of sharing it...

X-Song: "I Got It From Agnes", by Tom Lehrer
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[ Tom Lehrer? You're dating yourself, Al ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge tag 'omap-pm-v3.11/avs' of git://git.kernel.org/pub/scm/linux/kernel/git/khilma...
Rafael J. Wysocki [Sat, 15 Jun 2013 23:30:46 +0000 (01:30 +0200)]
Merge tag 'omap-pm-v3.11/avs' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into pm-omap

Pull PM / AVS: SmartReflex: misc. cleanups for 3.11 from Kevin Hilman.