Rafael J. Wysocki [Thu, 7 Nov 2013 18:24:20 +0000 (19:24 +0100)]
Merge branch 'pm-devfreq'
* pm-devfreq:
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
PM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c
PM / devfreq: Use devm_* APIs in exynos5_bus.c
PM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c
PM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c
Rafael J. Wysocki [Thu, 7 Nov 2013 18:23:20 +0000 (19:23 +0100)]
Merge branch 'powercap'
* powercap:
PowerCap: Fix build error with option -Werror=format-security
Rafael J. Wysocki [Thu, 7 Nov 2013 18:22:16 +0000 (19:22 +0100)]
Merge branch 'acpi-video'
* acpi-video:
Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"
ACPI / video: Quirk initial backlight level 0
ACPI / video: Fix initial level validity test
ACPI / blacklist: fix name of ThinkPad Edge E530
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.
...
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
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
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>
Aaron Lu [Wed, 6 Nov 2013 01:18:16 +0000 (09:18 +0800)]
Revert "ACPI / video: Ignore BIOS initial backlight value for HP 250 G1"
This reverts commit
e37f14a5fb85522f3bbf88ece6134c4e610ed598.
It turned out other systems also share the same problem with bug 63111
so I made a patch to catch initial brightness level 0 problem. With that
patch applied, we do not need to place HP 250 G1 in DMI table.
References: https://bugzilla.kernel.org/show_bug.cgi?id=63111
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Aaron Lu [Wed, 6 Nov 2013 01:07:10 +0000 (09:07 +0800)]
ACPI / video: Quirk initial backlight level 0
Some firmware doesn't initialize initial backlight level to a proper
value and _BQC will return 0 on first time evaluation. We used to be
able to detect such incorrect value with our code logic, as value 0
normally isn't a valid value in _BCL. But with the introduction of Win8,
firmware begins to fill _BCL with values from 0 to 100, now 0 becomes
a valid value but that value will make user's screen black. This patch
test initial _BQC for value 0, if such a value is returned, do not use
it.
References: https://bugzilla.kernel.org/show_bug.cgi?id=64031
References: https://bugzilla.kernel.org/show_bug.cgi?id=61231
References: https://bugzilla.kernel.org/show_bug.cgi?id=63111
Reported-by: Qingshuai Tian <qingshuai.tian@intel.com>
Tested-by: Aaron Lu <aaron.lu@intel.com> # on "Idealpad u330p"
Reported-and-tested-by: <erno@iki.fi> # on "Acer Aspire V5-573G"
Reported-and-tested-by: Kirill Tkhai <tkhai@yandex.ru> # on "HP 250 G1"
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Aaron Lu [Wed, 6 Nov 2013 01:03:15 +0000 (09:03 +0800)]
ACPI / video: Fix initial level validity test
When testing if the firmware's initial value is valid, we should use
the corrected level value instead of the raw value returned from
firmware.
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Felipe Contreras [Tue, 5 Nov 2013 07:20:42 +0000 (01:20 -0600)]
ACPI / blacklist: fix name of ThinkPad Edge E530
That is the advertised name.
http://shop.lenovo.com/us/en/laptops/thinkpad/edge-series/e530/
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Srinivas Pandruvada [Mon, 4 Nov 2013 16:53:10 +0000 (08:53 -0800)]
PowerCap: Fix build error with option -Werror=format-security
Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&control_type->dev, name).
Changed to dev_set_name(&control_type->dev, "%s", name).
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Rafael J. Wysocki [Wed, 30 Oct 2013 00:38:38 +0000 (01:38 +0100)]
Merge back earlier devfreq material for v3.13.
Rafael J. Wysocki [Wed, 30 Oct 2013 00:37:02 +0000 (01:37 +0100)]
Merge branch 'for-rafael' of git://git./linux/kernel/git/mzx/devfreq into pm-devfreq
Pull devfreq fixes from MyungJoo Ham.
* 'for-rafael' of git://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq:
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
PM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c
PM / devfreq: Use devm_* APIs in exynos5_bus.c
PM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c
PM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c
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>
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>
Dan Carpenter [Thu, 15 Aug 2013 07:55:10 +0000 (10:55 +0300)]
PM / devfreq: create_freezable_workqueue() doesn't return an ERR_PTR
The create_freezable_workqueue() function returns a NULL on error and
not an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Sachin Kamat [Fri, 7 Jun 2013 08:55:49 +0000 (14:25 +0530)]
PM / devfreq: Remove duplicate header file inclusion in exynos5_bus.c
linux/opp.h was included twice.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Sachin Kamat [Wed, 5 Jun 2013 06:13:01 +0000 (11:43 +0530)]
PM / devfreq: Use devm_* APIs in exynos5_bus.c
devm_* APIs are device managed and make clean up and exit codes
simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Sachin Kamat [Wed, 5 Jun 2013 06:13:00 +0000 (11:43 +0530)]
PM / devfreq: Remove redundant platform_set_drvdata() in exynos5_bus.c
Commit
0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Sachin Kamat [Wed, 5 Jun 2013 06:12:59 +0000 (11:42 +0530)]
PM / devfreq: Fix incorrect usage of IS_ERR_OR_NULL in exynos5_bus.c
platform_device_register_simple does not return NULL.
Hence NULL check is not required.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
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
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
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()
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
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
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
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
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()
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
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
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
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.
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
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
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
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
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()
...
Linus Torvalds [Sun, 27 Oct 2013 23:12:03 +0000 (16:12 -0700)]
Linux 3.12-rc7
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
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
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
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
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
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
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>
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
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>
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>
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>
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>
Rafael J. Wysocki [Fri, 25 Oct 2013 21:39:25 +0000 (23:39 +0200)]
Merge back earlier 'acpi-assorted' material.
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>
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>
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>
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>
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
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>
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>
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>
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
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>
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>
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()
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>