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

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

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

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

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

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

10 years agoACPI / event: remove unneeded NULL pointer check
Mathias Krause [Tue, 5 Nov 2013 20:25:32 +0000 (21:25 +0100)] 
ACPI / event: remove unneeded NULL pointer check

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

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

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPICA: Add __init for ACPICA initializers/finalizers.
Lv Zheng [Thu, 31 Oct 2013 01:31:24 +0000 (09:31 +0800)] 
ACPICA: Add __init for ACPICA initializers/finalizers.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This patch ports a fix from ACPICA upstream to Linux.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Version 20130927.

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

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

Known issue:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Sort the method names in acnames.h.

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

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

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

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

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

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

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

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

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

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

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

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

Mostly for consistency. ACPICA BZ 1042.

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

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

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

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

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

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

References: https://bugs.acpica.org/show_bug.cgi?id=1011
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI: Fix spelling mistake in error messages
Colin Ian King [Tue, 29 Oct 2013 10:34:19 +0000 (10:34 +0000)] 
ACPI: Fix spelling mistake in error messages

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

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

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

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

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge branch 'pm-cpufreq'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:29:34 +0000 (01:29 +0100)] 
Merge branch 'pm-cpufreq'

* pm-cpufreq: (167 commits)
  cpufreq: create per policy rwsem instead of per CPU cpu_policy_rwsem
  intel_pstate: Add Baytrail support
  intel_pstate: Refactor driver to support CPUs with different MSR layouts
  cpufreq: Implement light weight ->target_index() routine
  PM / OPP: rename header to linux/pm_opp.h
  PM / OPP: rename data structures to dev_pm equivalents
  PM / OPP: rename functions to dev_pm_opp*
  cpufreq / governor: Remove fossil comment
  cpufreq: exynos4210: Use the common clock framework to set APLL clock rate
  cpufreq: exynos4x12: Use the common clock framework to set APLL clock rate
  cpufreq: Detect spurious invocations of update_policy_cpu()
  cpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model
  cpufreq: pmac64: provide cpufreq transition latency for older G5 models
  cpufreq: pmac64: speed up frequency switch
  cpufreq: highbank-cpufreq: Enable Midway/ECX-2000
  exynos-cpufreq: fix false return check from "regulator_set_voltage"
  speedstep-centrino: Remove unnecessary braces
  acpi-cpufreq: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case
  cpufreq: arm-big-little: use clk_get instead of clk_get_sys
  cpufreq: exynos: Show a list of available frequencies
  ...

Conflicts:
drivers/devfreq/exynos/exynos5_bus.c

10 years agoMerge branch 'pm-sleep'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:28:07 +0000 (01:28 +0100)] 
Merge branch 'pm-sleep'

* pm-sleep:
  PM / Hibernate: Use bool for boolean fields of struct snapshot_data
  PM / Sleep: Detect device suspend/resume lockup and log event

10 years agoMerge branch 'pm-qos'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:27:21 +0000 (01:27 +0100)] 
Merge branch 'pm-qos'

* pm-qos:
  PM / QoS: simplify pm_qos_power_write()

10 years agoMerge branch 'pm-devfreq'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:25:59 +0000 (01:25 +0100)] 
Merge branch 'pm-devfreq'

* pm-devfreq:
  PM / devfreq: Remove duplicate include of opp.h

10 years agoMerge branch 'pm-cpuidle'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:24:10 +0000 (01:24 +0100)] 
Merge branch 'pm-cpuidle'

* pm-cpuidle:
  ARM: AT91: DT: pm: Select ram controller standby based on DT
  ARM: AT91: pm: Factorize standby function
  ARM: at91: cpuidle: Move driver to drivers/cpuidle
  ARM: at91: cpuidle: Convert to platform driver
  ARM: ux500: cpuidle: fix section mismatch
  ARM: zynq: cpuidle: convert to platform driver
  ARM: zynq: cpuidle: Remove useless compatibility string
  drivers: cpuidle: rename ARM big.LITTLE driver config and makefile entries
  ARM: EXYNOS: convert cpuidle driver to be a platform driver
  intel_idle: mark some functions with __init tag
  intel_idle: mark states tables with __initdata tag
  intel_idle: shrink states tables

10 years agoMerge branch 'pm-runtime'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:23:17 +0000 (01:23 +0100)] 
Merge branch 'pm-runtime'

* pm-runtime:
  PM / Runtime: Respect autosuspend when idle triggers suspend

10 years agoMerge branch 'powercap'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:21:49 +0000 (01:21 +0100)] 
Merge branch 'powercap'

* powercap:
  PowerCap: Convert class code to use dev_groups
  PowerCap: Introduce Intel RAPL power capping driver
  bitops: Introduce BIT_ULL
  x86 / msr: add 64bit _on_cpu access functions
  PowerCap: Add to drivers Kconfig and Makefile
  PowerCap: Add class driver
  PowerCap: Documentation

10 years agoMerge branch 'acpi-assorted'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:20:24 +0000 (01:20 +0100)] 
Merge branch 'acpi-assorted'

* acpi-assorted:
  ACPI: Add Toshiba NB100 to Vista _OSI blacklist
  ACPI / osl: remove an unneeded NULL check
  ACPI / platform: add ACPI ID for a Broadcom GPS chip
  ACPI: improve acpi_extract_package() utility
  ACPI / LPSS: fix UART Auto Flow Control
  ACPI / platform: Add ACPI IDs for Intel SST audio device
  x86 / ACPI: fix incorrect placement of __initdata tag
  ACPI / thermal: convert printk(LEVEL...) to pr_<lvl>
  ACPI / sysfs: make GPE sysfs attributes only accept correct values
  ACPI / EC: Convert all printk() calls to dynamic debug function
  ACPI / button: Using input_set_capability() to mark device's event capability
  ACPI / osl: implement acpi_os_sleep() with msleep()

10 years agoMerge branch 'acpi-video'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:20:14 +0000 (01:20 +0100)] 
Merge branch 'acpi-video'

* acpi-video:
  ACPI: Add Toshiba NB100 to Vista _OSI blacklist
  ACPI / video: Ignore BIOS initial backlight value for HP 250 G1
  ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist
  thinkpad-acpi: fix handle locate for video and query of _BCL
  ACPI / video: Do not register backlight if win8 and native interface exists
  ACPI / video: seperate backlight control and event interface
  backlight: introduce backlight_device_registered
  ACPI: add missing win8 OSI comment to blacklist
  ACPI: update win8 OSI blacklist

10 years agoMerge branch 'acpi-pm'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:17:49 +0000 (01:17 +0100)] 
Merge branch 'acpi-pm'

* acpi-pm:
  spi: attach/detach SPI device to the ACPI power domain
  i2c: attach/detach I2C client device to the ACPI power domain
  ACPI / PM: allow child devices to ignore parent power state

10 years agoMerge branch 'acpi-ipmi'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:15:55 +0000 (01:15 +0100)] 
Merge branch 'acpi-ipmi'

* acpi-ipmi:
  ACPI / IPMI: Cleanup coding styles
  ACPI / IPMI: Cleanup some Kconfig codes
  ACPI / IPMI: Cleanup some inclusion codes
  ACPI / IPMI: Cleanup some initialization codes
  ACPI / IPMI: Cleanup several acpi_ipmi_device members
  ACPI / IPMI: Add reference counting for ACPI IPMI transfers
  ACPI / IPMI: Use global IPMI operation region handler
  ACPI / IPMI: Fix race caused by the unprotected ACPI IPMI user
  ACPI / IPMI: Fix race caused by the timed out ACPI IPMI transfers
  ACPI / IPMI: Fix race caused by the unprotected ACPI IPMI transfers
  ACPI / IPMI: Fix potential response buffer overflow

10 years agoMerge branch 'acpica'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:14:59 +0000 (01:14 +0100)] 
Merge branch 'acpica'

* acpica:
  MAINTAINERS / ACPICA: Add ACPICA information to MAINTAINERS
  ACPICA: Update version to 20130823.
  ACPICA: SCI Handlers: Update handler interface, eliminate unnecessary argument.
  ACPICA: Cleanup exception codes.
  ACPICA: Tables: Cleanup RSDP signature codes.
  ACPICA: Tables: Cleanup table checksum verification code.
  ACPICA: Debugger: Add new command to display full namespace pathnames.
  ACPICA: Operation region support: Never free the handler "context" pointer.
  ACPICA: Add support for host-installed SCI handlers.
  ACPICA: Validate start object for acpi_walk_namespace.
  ACPICA: Debugger: Prevent possible command line buffer overflow, kernel behavior is not affected.
  ACPICA: Linux-specific header: enable "aarch64" 64-bit build.
  ACPICA: Debug output: small formatting update, no functional change.
  ACPICA: acpi_read: On error, do not modify the return value target location.
  ACPICA: Improve error message for "too many parent prefixes" condition.

10 years agoMerge branch 'acpi-conversion'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:14:17 +0000 (01:14 +0100)] 
Merge branch 'acpi-conversion'

* acpi-conversion:
  ACPI / AC: Remove AC's proc directory.
  ideapad_laptop: convert ideapad device/driver to platform bus
  ideapad_laptop: remove ideapad_handle and ideapad_priv
  ideapad_laptop: convert internal function calls to use ideapad_private as parameter
  ideapad_laptop: introduce struct acpi_device pointer to ideapad_private structure
  ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code
  ACPI / AC: convert ACPI ac driver to platform bus

10 years agoMerge branch 'acpi-tables'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:13:29 +0000 (01:13 +0100)] 
Merge branch 'acpi-tables'

* acpi-tables:
  ACPI / x86: Increase override tables number limit

10 years agoMerge branch 'acpi-hotplug'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:12:41 +0000 (01:12 +0100)] 
Merge branch 'acpi-hotplug'

* acpi-hotplug:
  ACPI / memhotplug: Use defined marco METHOD_NAME__STA
  ACPI / hotplug: Use kobject_init_and_add() instead of _init() and _add()
  ACPI / hotplug: Don't set kobject parent pointer explicitly
  ACPI / hotplug: Set kobject name via kobject_add(), not kobject_set_name()
  hotplug, powerpc, x86: Remove cpu_hotplug_driver_lock()
  hotplug / x86: Disable ARCH_CPU_PROBE_RELEASE on x86
  hotplug / x86: Add hotplug lock to missing places
  hotplug / x86: Fix online state in cpu0 debug interface

10 years agoMerge branch 'acpi-processor'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:11:24 +0000 (01:11 +0100)] 
Merge branch 'acpi-processor'

* acpi-processor:
  ACPI / processor: fixed a brace coding style issue
  ACPI / processor: Remove outdated comments
  ACPI / processor: remove unnecessary if (!pr) check
  ACPI / processor: remove some dead code in acpi_processor_get_info()
  x86 / ACPI: simplify _acpi_map_lsapic()
  ACPI / processor: use apic_id and remove duplicated _MAT evaluation
  ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id

10 years agoMerge branch 'acpi-cleanup'
Rafael J. Wysocki [Mon, 28 Oct 2013 00:10:20 +0000 (01:10 +0100)] 
Merge branch 'acpi-cleanup'

* acpi-cleanup: (34 commits)
  ACPI / proc: Remove alarm proc file
  ACPI: Remove CONFIG_ACPI_PROCFS_POWER and cm_sbsc.c
  ACPI / SBS: Remove SBS's proc directory
  ACPI / Battery: Remove battery's proc directory
  ACP / fan: trivial style cleanup
  ACPI / processor: remove superfluous pr == NULL checks
  ACPI / mm: use NUMA_NO_NODE
  toshiba_acpi: convert acpi_evaluate_object() to acpi_evaluate_integer()
  intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer()
  intel-rst: convert acpi_evaluate_object() to acpi_evaluate_integer()
  fujitsu-laptop: convert acpi_evaluate_object() to acpi_evaluate_integer()
  i2c-hid: convert acpi_evaluate_object() to acpi_evaluate_integer()
  ACPI: dock: convert acpi_evaluate_object() to acpi_evaluate_integer()
  acpi_processor: convert acpi_evaluate_object() to acpi_evaluate_integer()
  pnpacpi: convert acpi_get_handle() to acpi_has_method()
  wmi: convert acpi_get_handle() to acpi_has_method()
  toshiba_acpi: convert acpi_get_handle() to acpi_has_method()
  sony-laptop: convert acpi_get_handle() to acpi_has_method()
  intel_menlow: convert acpi_get_handle() to acpi_has_method()
  fujitsu-laptop: convert acpi_get_handle() to acpi_has_method()
  ...

10 years agoLinux 3.12-rc7
Linus Torvalds [Sun, 27 Oct 2013 23:12:03 +0000 (16:12 -0700)] 
Linux 3.12-rc7

10 years agoMerge branch 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 27 Oct 2013 17:45:00 +0000 (10:45 -0700)] 
Merge branch 'parisc-3.12' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fix from Helge Deller:
 "This is a 2-line patch to save the CPU register which holds our task
  thread info pointer before calling a firmware function and then to
  restore it again afterwards.

  This is necessary because on some 64bit machines the high-order 32bits
  are being clobbered by the firmware call, and thus we failed to bring
  up secondary CPUs (and instead crashed the kernel) in some situations
  eg if we had more than 4GB RAM.  This patch fixes a bug which has been
  since ever in the parisc linux kernel and which prevented some people
  to use a 64bit kernel"

* 'parisc-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM

10 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 27 Oct 2013 17:29:25 +0000 (10:29 -0700)] 
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "This tree contains a clockevents regression fix for certain ARM
  subarchitectures"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clockevents: Sanitize ticks to nsec conversion

10 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 27 Oct 2013 17:28:35 +0000 (10:28 -0700)] 
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "The tree contains three fixes:

   - Two tooling fixes

   - Reversal of the new 'MMAP2' extended mmap record ABI, introduced in
     this merge window.  (Patches were proposed to fix it but it was all
     a bit late and we felt it's safer to just delay the ABI one more
     kernel release and do it right)"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Disable PERF_RECORD_MMAP2 support
  perf scripting perl: Fix build error on Fedora 12
  perf probe: Fix to initialize fname always before use it

10 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 27 Oct 2013 17:18:15 +0000 (10:18 -0700)] 
Merge branch 'core-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
 "This tree fixes a boot crash in CONFIG_DEBUG_MUTEXES=y kernels, on
  kernels built with GCC 3.x (there are still such distros)"

Side note: it's not just a fix for old gcc versions, it's also removing
an incredibly broken/subtle check that LLVM had issues with, and that
made no sense.

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  mutex: Avoid gcc version dependent __builtin_constant_p() usage

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sun, 27 Oct 2013 17:16:33 +0000 (10:16 -0700)] 
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Here are the outstanding target pending fixes for v3.12-rc7.

  This includes a number of EXTENDED_COPY related fixes as a result of
  Thomas and Doug's continuing testing and feedback.

  Also included is an important vhost/scsi fix that addresses a long
  standing issue where the 'write' parameter for get_user_pages_fast()
  was incorrectly set for virtio-scsi WRITEs -> DMA_TO_DEVICE, and not
  for virtio-scsi READs -> DMA_FROM_DEVICE.

  This resulted in random userspace segfaults and other unpleasantness
  on KVM host, and unfortunately has been an issue since the initial
  merge of vhost/scsi in v3.6.  This patch is CC'ed to stable, along
  with two other less critical items"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter
  target/pscsi: fix return value check
  target: Fail XCOPY for non matching source + destination block_size
  target: Generate failure for XCOPY I/O with non-zero scsi_status
  target: Add missing XCOPY I/O operation sense_buffer
  iser-target: check device before dereferencing its variable
  target: Return an error for WRITE SAME with ANCHOR==1
  target: Fix assignment of LUN in tracepoints
  target: Reject EXTENDED_COPY when emulate_3pc is disabled
  target: Allow non zero ListID in EXTENDED_COPY parameter list
  target: Make target_do_xcopy failures return INVALID_PARAMETER_LIST

10 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Sun, 27 Oct 2013 17:13:03 +0000 (10:13 -0700)] 
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "Here is the late fixes pull request for dmaengine while you fly back
  from KS.

  We have a new dmaengine ML hosted by vger so a patch for that along
  with addition of Dave as driver mainatainer for ioat.  Other fixes are
  memeory leak fixes on edma driver, small fixes on rcar-hpbdma driver
  by Sergei"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: edma: fix another memory leak
  dma: edma: Fix memory leak
  MAINTAINERS: add to ioatdma maintainer list
  MAINTAINERS: add the new dmaengine mailing list

10 years agoparisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM
Helge Deller [Sat, 26 Oct 2013 21:19:25 +0000 (23:19 +0200)] 
parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM

Since the beginning of the parisc-linux port, sometimes 64bit SMP kernels were
not able to bring up other CPUs than the monarch CPU and instead crashed the
kernel.  The reason was unclear, esp. since it involved various machines (e.g.
J5600, J6750 and SuperDome). Testing showed, that those crashes didn't happened
when less than 4GB were installed, or if a 32bit Linux kernel was booted.

In the end, the fix for those SMP problems is trivial:
During the early phase of the initialization of the CPUs, including the monarch
CPU, the PDC_PSW firmware function to enable WIDE (=64bit) mode is called.
It's documented that this firmware function may clobber various registers, and
one one of those possibly clobbered registers is %cr30 which holds the task
thread info pointer.

Now, if %cr30 would always have been clobbered, then this bug would have been
detected much earlier. But lots of testing finally showed, that - at least for
%cr30 - on some machines only the upper 32bits of the 64bit register suddenly
turned zero after the firmware call.

So, after finding the root cause, the explanation for the various crashes
became clear:
- On 32bit SMP Linux kernels all upper 32bit were zero, so we didn't faced this
  problem.
- Monarch CPUs in 64bit mode always booted sucessfully, because the inital task
  thread info pointer was below 4GB.
- Secondary CPUs booted sucessfully on machines with less than 4GB RAM because
  the upper 32bit were zero anyay.
- Secondary CPus failed to boot if we had more than 4GB RAM and the task thread
  info pointer was located above the 4GB boundary.

Finally, the patch to fix this problem is trivial by saving the %cr30 register
before the firmware call and restoring it afterwards.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: <stable@vger.kernel.org> # 2.6.12+
Signed-off-by: Helge Deller <deller@gmx.de>
10 years agoMerge tag 'pm+acpi-3.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sat, 26 Oct 2013 03:38:47 +0000 (04:38 +0100)] 
Merge tag 'pm+acpi-3.12-rc7' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from
 "These fix two bugs in the intel_pstate driver, a hibernate bug leading
  to nasty resume failures sometimes and acpi-cpufreq initialization bug
  that causes problems to happen during module unload when intel_pstate
  is in use.

  Specifics:

   - Fix for rounding errors in intel_pstate causing CPU utilization to
     be underestimated from Brennan Shacklett.

   - intel_pstate fix to always use the correct max pstate value when
     computing the min pstate from Dirk Brandewie.

   - Hibernation fix for deadlocking resume in cases when the probing of
     the device containing the image is deferred from Russ Dill.

   - acpi-cpufreq fix to prevent the module from staying in memory when
     the driver cannot be registered and then attempting to unregister
     things that have never been registered on exit"

* tag 'pm+acpi-3.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  acpi-cpufreq: Fail initialization if driver cannot be registered
  PM / hibernate: Move software_resume to late_initcall_sync
  intel_pstate: Correct calculation of min pstate value
  intel_pstate: Improve accuracy by not truncating until final result

10 years agocpufreq: create per policy rwsem instead of per CPU cpu_policy_rwsem
viresh kumar [Fri, 18 Oct 2013 13:40:15 +0000 (19:10 +0530)] 
cpufreq: create per policy rwsem instead of per CPU cpu_policy_rwsem

We have per-CPU cpu_policy_rwsem for cpufreq core, but we never use
all of them. We always use rwsem of policy->cpu and so we can
actually make this rwsem per policy instead.

This patch does this change. With this change other tricky situations
are also avoided now, like which lock to take while we are changing
policy->cpu, etc.

Suggested-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agointel_pstate: Add Baytrail support
Dirk Brandewie [Mon, 21 Oct 2013 16:20:35 +0000 (09:20 -0700)] 
intel_pstate: Add Baytrail support

Add support for the Baytrail processor.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agointel_pstate: Refactor driver to support CPUs with different MSR layouts
Dirk Brandewie [Mon, 21 Oct 2013 16:20:34 +0000 (09:20 -0700)] 
intel_pstate: Refactor driver to support CPUs with different MSR layouts

Non-core processors have a different MSR layout to commumicate P state
information. Refactor the driver to use CPU dependent accessors to
P state information.

Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI: Add Toshiba NB100 to Vista _OSI blacklist
Levente Kurusa [Tue, 22 Oct 2013 14:53:35 +0000 (16:53 +0200)] 
ACPI: Add Toshiba NB100 to Vista _OSI blacklist

This patch adds Toshiba NB100 to the Vista _OSI blacklist.

The _OSI(Windows 2006) method is bugged on the netbook resulting in
messed up PCI IRQ Routing information. This was observed on a netbook
whose SATA controller mode was set to Compatibility mode.

The controller would then issue IRQs to IRQ#16 instead of
IRQ#20, where it should have been.

No side-effects were found during testing, everything is
working as it did before.

References: http://marc.info/?t=137862230200001&r=1&w=2
References: http://www.spinics.net/lists/linux-ide/msg46173.html
Signed-off-by: Levente Kurusa <levex@linux.com>
Reviewed-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge back earlier 'acpi-assorted' material.
Rafael J. Wysocki [Fri, 25 Oct 2013 21:39:25 +0000 (23:39 +0200)] 
Merge back earlier 'acpi-assorted' material.

10 years agoACPI: Add Toshiba NB100 to Vista _OSI blacklist
Levente Kurusa [Tue, 22 Oct 2013 14:53:35 +0000 (16:53 +0200)] 
ACPI: Add Toshiba NB100 to Vista _OSI blacklist

This patch adds Toshiba NB100 to the Vista _OSI blacklist.

The _OSI(Windows 2006) method is bugged on the netbook resulting in
messed up PCI IRQ Routing information. This was observed on a netbook
whose SATA controller mode was set to Compatibility mode.

The controller would then issue IRQs to IRQ#16 instead of
IRQ#20, where it should have been.

No side-effects were found during testing, everything is
working as it did before.

References: http://marc.info/?t=137862230200001&r=1&w=2
References: http://www.spinics.net/lists/linux-ide/msg46173.html
Signed-off-by: Levente Kurusa <levex@linux.com>
Reviewed-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoACPI / video: Ignore BIOS initial backlight value for HP 250 G1
Kirill Tkhai [Fri, 18 Oct 2013 11:56:44 +0000 (15:56 +0400)] 
ACPI / video: Ignore BIOS initial backlight value for HP 250 G1

On HP 250 G1 laptops, BIOS reports minimum backlight on boot and
causes backlight to dim completely. This ignores the initial backlight
values and set to max brightness.

References: https://bugzilla.kernel.org/show_bug.cgi?id=63111
Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPowerCap: Convert class code to use dev_groups
Thierry Reding [Wed, 23 Oct 2013 11:37:35 +0000 (13:37 +0200)] 
PowerCap: Convert class code to use dev_groups

The newly added power capping framework uses the obsolete .dev_attrs
field of struct class. However this field will be removed in 3.13, so
convert the code to use the .dev_groups field instead.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Implement light weight ->target_index() routine
Viresh Kumar [Fri, 25 Oct 2013 14:15:48 +0000 (19:45 +0530)] 
cpufreq: Implement light weight ->target_index() routine

Currently, the prototype of cpufreq_drivers target routines is:

int target(struct cpufreq_policy *policy, unsigned int target_freq,
unsigned int relation);

And most of the drivers call cpufreq_frequency_table_target() to get a valid
index of their frequency table which is closest to the target_freq. And they
don't use target_freq and relation after that.

So, it makes sense to just do this work in cpufreq core before calling
cpufreq_frequency_table_target() and simply pass index instead. But this can be
done only with drivers which expose their frequency table with cpufreq core. For
others we need to stick with the old prototype of target() until those drivers
are converted to expose frequency tables.

This patch implements the new light weight prototype for target_index() routine.
It looks like this:

int target_index(struct cpufreq_policy *policy, unsigned int index);

CPUFreq core will call cpufreq_frequency_table_target() before calling this
routine and pass index to it. Because CPUFreq core now requires to call routines
present in freq_table.c CONFIG_CPU_FREQ_TABLE must be enabled all the time.

This also marks target() interface as deprecated. So, that new drivers avoid
using it. And Documentation is updated accordingly.

It also converts existing .target() to newly defined light weight
.target_index() routine for many driver.

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Russell King <linux@arm.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@rjwysocki.net>
10 years agoMerge back earlier 'pm-cpufreq' material.
Rafael J. Wysocki [Fri, 25 Oct 2013 20:36:40 +0000 (22:36 +0200)] 
Merge back earlier 'pm-cpufreq' material.

Conflicts:
drivers/cpufreq/omap-cpufreq.c

10 years agoPM / OPP: rename header to linux/pm_opp.h
Nishanth Menon [Thu, 19 Sep 2013 21:03:52 +0000 (16:03 -0500)] 
PM / OPP: rename header to linux/pm_opp.h

Since Operating Performance Points (OPP) functions are specific
to device specific power management, be specific and rename opp.h
to pm_opp.h

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / OPP: rename data structures to dev_pm equivalents
Nishanth Menon [Thu, 19 Sep 2013 21:03:51 +0000 (16:03 -0500)] 
PM / OPP: rename data structures to dev_pm equivalents

Since Operating Performance Points (OPP) data structures are specific
to device specific power management, be specific and rename opp_* data
structures in OPP library with dev_pm_opp_* equivalent.

Affected structures are:
 struct opp
 enum opp_event

Minor checkpatch warning resulting of this change was fixed as well.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoPM / OPP: rename functions to dev_pm_opp*
Nishanth Menon [Thu, 19 Sep 2013 21:03:50 +0000 (16:03 -0500)] 
PM / OPP: rename functions to dev_pm_opp*

Since Operating Performance Points (OPP) functions are specific to
device specific power management, be specific and rename opp_*
accessors in OPP library with dev_pm_opp_* equivalent.

Affected functions are:
 opp_get_voltage
 opp_get_freq
 opp_get_opp_count
 opp_find_freq_exact
 opp_find_freq_floor
 opp_find_freq_ceil
 opp_add
 opp_enable
 opp_disable
 opp_get_notifier
 opp_init_cpufreq_table
 opp_free_cpufreq_table

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoMerge tag 'for-linus-20131025' of git://git.infradead.org/linux-mtd
Linus Torvalds [Fri, 25 Oct 2013 19:15:13 +0000 (20:15 +0100)] 
Merge tag 'for-linus-20131025' of git://git.infradead.org/linux-mtd

Pull final mtd fixes from Brian Norris:
 "A few more last-minute regression fixes, prepared jointly by me and
  David Woodhouse:

   - Revert pxa3xx to its old name to avoid breaking existing
     'mtdparts=' boot strings.

   - Return GPMI NAND to its legacy ECC layout for backwards
     compatibility.  We will revisit this in 3.13.

  A note from David on the latter fix: 'This leaves a harmless cosmetic
  warning about an unused function.  At this point in the cycle I really
  don't care.'"

* tag 'for-linus-20131025' of git://git.infradead.org/linux-mtd:
  mtd: gpmi: fix ECC regression
  mtd: nand: pxa3xx: Fix registered MTD name

10 years agovhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter
Nicholas Bellinger [Fri, 25 Oct 2013 17:44:15 +0000 (10:44 -0700)] 
vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter

This patch addresses a long-standing bug where the get_user_pages_fast()
write parameter used for setting the underlying page table entry permission
bits was incorrectly set to write=1 for data_direction=DMA_TO_DEVICE, and
passed into get_user_pages_fast() via vhost_scsi_map_iov_to_sgl().

However, this parameter is intended to signal WRITEs to pinned userspace
PTEs for the virtio-scsi DMA_FROM_DEVICE -> READ payload case, and *not*
for the virtio-scsi DMA_TO_DEVICE -> WRITE payload case.

This bug would manifest itself as random process segmentation faults on
KVM host after repeated vhost starts + stops and/or with lots of vhost
endpoints + LUNs.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Asias He <asias@redhat.com>
Cc: <stable@vger.kernel.org> # 3.6+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
10 years agotarget/pscsi: fix return value check
Wei Yongjun [Fri, 25 Oct 2013 13:53:33 +0000 (21:53 +0800)] 
target/pscsi: fix return value check

In case of error, the function scsi_host_lookup() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Fri, 25 Oct 2013 17:16:47 +0000 (18:16 +0100)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes (try two) from Al Viro:
 "nfsd performance regression fix + seq_file lseek(2) fix"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  seq_file: always update file->f_pos in seq_lseek()
  nfsd regression since delayed fput()

10 years agomtd: gpmi: fix ECC regression
David Woodhouse [Fri, 25 Oct 2013 14:03:59 +0000 (15:03 +0100)] 
mtd: gpmi: fix ECC regression

The "legacy" ECC layout used until 3.12-rc1 uses all the OOB area by
computing the ECC strength and ECC step size ourselves.

Commit 2febcdf84b ("mtd: gpmi: set the BCHs geometry with the ecc info")
makes the driver use the ECC info (ECC strength and ECC step size)
provided by the MTD code, and creates a different NAND ECC layout
for the BCH, and use the new ECC layout. This causes a regression:

   We can not mount the ubifs which was created by the old NAND ECC layout.

This patch fixes this issue by reverting to the legacy ECC layout.

We will probably introduce a new device-tree property to indicate that
the new ECC layout can be used. For now though, for the imminent 3.12
release, we just unconditionally revert to the 3.11 behaviour.

This leaves a harmless cosmetic warning about an unused function. At
this point in the cycle I really don't care.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
10 years agoseq_file: always update file->f_pos in seq_lseek()
Gu Zheng [Fri, 25 Oct 2013 10:15:06 +0000 (18:15 +0800)] 
seq_file: always update file->f_pos in seq_lseek()

This issue was first pointed out by Jiaxing Wang several months ago, but no
further comments:
https://lkml.org/lkml/2013/6/29/41

As we know pread() does not change f_pos, so after pread(), file->f_pos
and m->read_pos become different. And seq_lseek() does not update file->f_pos
if offset equals to m->read_pos, so after pread() and seq_lseek()(lseek to
m->read_pos), then a subsequent read may read from a wrong position, the
following program produces the problem:

    char str1[32] = { 0 };
    char str2[32] = { 0 };
    int poffset = 10;
    int count = 20;

    /*open any seq file*/
    int fd = open("/proc/modules", O_RDONLY);

    pread(fd, str1, count, poffset);
    printf("pread:%s\n", str1);

    /*seek to where m->read_pos is*/
    lseek(fd, poffset+count, SEEK_SET);

    /*supposed to read from poffset+count, but this read from position 0*/
    read(fd, str2, count);
    printf("read:%s\n", str2);

out put:
pread:
 ck_netbios_ns 12665
read:
 nf_conntrack_netbios

/proc/modules:
nf_conntrack_netbios_ns 12665 0 - Live 0xffffffffa038b000
nf_conntrack_broadcast 12589 1 nf_conntrack_netbios_ns, Live 0xffffffffa0386000

So we always update file->f_pos to offset in seq_lseek() to fix this issue.

Signed-off-by: Jiaxing Wang <hello.wjx@gmail.com>
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoacpi-cpufreq: Fail initialization if driver cannot be registered
Rafael J. Wysocki [Fri, 25 Oct 2013 14:22:47 +0000 (16:22 +0200)] 
acpi-cpufreq: Fail initialization if driver cannot be registered

Make acpi_cpufreq_init() return error codes when the driver cannot be
registered so that the module doesn't stay useless in memory and so
that acpi_cpufreq_exit() doesn't attempt to unregister things that
have never been registered when the module is unloaded.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Fri, 25 Oct 2013 10:49:23 +0000 (11:49 +0100)] 
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "There's really only one bugfix in this branch, which is a fix for
  timers on the integrator platform.  Since Linus Walleij is
  resurrecting support for the platform it seems valuable to get the fix
  into 3.12 even though the regression has been around a while.

  The rest are a handful of maintainers updates.  If you prefer to hold
  those until 3.13 then just merge the first patch on the branch which
  is the fix"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  MAINTAINERS: Add maintainers entry for Rockchip SoCs
  MAINTAINERS: Tegra updates, and driver ownership
  MAINTAINERS: ARM: mvebu: add Sebastian Hesselbarth
  ARM: integrator: deactivate timer0 on the Integrator/CP

10 years agoMerge tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 25 Oct 2013 06:32:01 +0000 (07:32 +0100)] 
Merge tag 'ecryptfs-3.12-rc7-fixes' of git://git./linux/kernel/git/tyhicks/ecryptfs

Pull ecryptfs fixes from Tyler Hicks:
 "Two important fixes
   - Fix long standing memory leak in the (rarely used) public key
     support
   - Fix large file corruption on 32 bit architectures"

* tag 'ecryptfs-3.12-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  eCryptfs: fix 32 bit corruption issue
  ecryptfs: Fix memory leakage in keystore.c

10 years agoPM / hibernate: Move software_resume to late_initcall_sync
Russ Dill [Thu, 24 Oct 2013 13:25:26 +0000 (14:25 +0100)] 
PM / hibernate: Move software_resume to late_initcall_sync

software_resume is being called after deferred_probe_initcall in
drivers base. If the probing of the device that contains the resume
image is deferred, and the system has been instructed to wait for
it to show up, this wait will occur in software_resume. This causes
a deadlock.

Move software_resume into late_initcall_sync so that it happens
after all the other late_initcalls.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
Acked-by: Pavel Machek <Pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agomtd: nand: pxa3xx: Fix registered MTD name
Ezequiel Garcia [Sat, 19 Oct 2013 21:19:25 +0000 (18:19 -0300)] 
mtd: nand: pxa3xx: Fix registered MTD name

In a recent commit:

  commit f455578dd961087a5cf94730d9f6489bb1d355f0
  Author: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
  Date:   Mon Aug 12 14:14:53 2013 -0300

  mtd: nand: pxa3xx: Remove hardcoded mtd name

  There's no advantage in using a hardcoded name for the mtd device.
  Instead use the provided by the platform_device.

The MTD name was changed to use the one provided by the platform_device.
However, this can be problematic as some users want to set partitions
using the kernel parameter 'mtdparts', where the name is needed.

Therefore, to avoid regressions in users relying in 'mtdparts' we revert
the change and use the previous one 'pxa3xx_nand-0'.

While at it, let's put a big comment and prevent this change from happening
ever again.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
10 years agoeCryptfs: fix 32 bit corruption issue
Colin Ian King [Thu, 24 Oct 2013 14:08:07 +0000 (14:08 +0000)] 
eCryptfs: fix 32 bit corruption issue

Shifting page->index on 32 bit systems was overflowing, causing
data corruption of > 4GB files. Fix this by casting it first.

https://launchpad.net/bugs/1243636

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reported-by: Lars Duesing <lars.duesing@camelotsweb.de>
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
10 years agodmaengine: edma: fix another memory leak
Vinod Koul [Thu, 24 Oct 2013 16:47:50 +0000 (22:17 +0530)] 
dmaengine: edma: fix another memory leak

commit 4b6271a6 fix a menory leak but one more existed in driver so fix that

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
10 years agodma: edma: Fix memory leak
Valentin Ilie [Thu, 24 Oct 2013 13:14:22 +0000 (16:14 +0300)] 
dma: edma: Fix memory leak

When it fails to allocate a slot, edesc should be free'd before return;

Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
10 years agotarget: Fail XCOPY for non matching source + destination block_size
Nicholas Bellinger [Thu, 24 Oct 2013 07:27:00 +0000 (00:27 -0700)] 
target: Fail XCOPY for non matching source + destination block_size

This patch adds an explicit check + failure for XCOPY I/O to source +
destination devices with a non-matching block_size.

This limitiation is currently due to the fact that the scatterlist
memory allocated for the XCOPY READ operation is passed zero-copy
to the XCOPY WRITE operation.

Reported-by: Thomas Glanzmann <thomas@glanzmann.de>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Thomas Glanzmann <thomas@glanzmann.de>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
10 years agotarget: Generate failure for XCOPY I/O with non-zero scsi_status
Nicholas Bellinger [Thu, 24 Oct 2013 07:15:27 +0000 (00:15 -0700)] 
target: Generate failure for XCOPY I/O with non-zero scsi_status

This patch adds the missing non-zero se_cmd->scsi_status check required
for local XCOPY I/O within target_xcopy_issue_pt_cmd() to signal an
exception case failure.

This will trigger the generation of SAM_STAT_CHECK_CONDITION status
from within target_xcopy_do_work() process context code.

Reported-by: Thomas Glanzmann <thomas@glanzmann.de>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Thomas Glanzmann <thomas@glanzmann.de>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
10 years agotarget: Add missing XCOPY I/O operation sense_buffer
Nicholas Bellinger [Thu, 24 Oct 2013 07:10:36 +0000 (00:10 -0700)] 
target: Add missing XCOPY I/O operation sense_buffer

This patch adds the missing xcopy_pt_cmd->sense_buffer[] required for
correctly handling CHECK_CONDITION exceptions within the locally
generated XCOPY I/O path.

Also update target_xcopy_read_source() + target_xcopy_setup_pt_cmd()
to pass this buffer into transport_init_se_cmd() to correctly setup
se_cmd->sense_buffer.

Reported-by: Thomas Glanzmann <thomas@glanzmann.de>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: Thomas Glanzmann <thomas@glanzmann.de>
Cc: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
10 years agoMerge tag 'md/3.12-fixes' of git://neil.brown.name/md
Linus Torvalds [Thu, 24 Oct 2013 06:45:34 +0000 (07:45 +0100)] 
Merge tag 'md/3.12-fixes' of git://neil.brown.name/md

Pull md bugfixes from Neil Brown:
 "Assorted md bug-fixes for 3.12.

  All tagged for -stable releases too"

* tag 'md/3.12-fixes' of git://neil.brown.name/md:
  raid5: avoid finding "discard" stripe
  raid5: set bio bi_vcnt 0 for discard request
  md: avoid deadlock when md_set_badblocks.
  md: Fix skipping recovery for read-only arrays.

10 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Thu, 24 Oct 2013 06:44:47 +0000 (07:44 +0100)] 
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of two fixes which cause oopses (Buslogic, qla2xxx) and
 one fix which may cause a hang because of request miscounting (sd)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  [SCSI] sd: call blk_pm_runtime_init before add_disk
  [SCSI] qla2xxx: Fix request queue null dereference.
  [SCSI] BusLogic: Fix an oops when intializing multimaster adapter

10 years agoiser-target: check device before dereferencing its variable
Vu Pham [Mon, 21 Oct 2013 21:48:54 +0000 (00:48 +0300)] 
iser-target: check device before dereferencing its variable

This patch changes isert_connect_release() to correctly check for
the existence struct isert_device *device before checking for
isert_device->use_frwr.

Signed-off-by: Vu Pham <vu@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This page took 0.079214 seconds and 5 git commands to generate.