[PATCH v4 0/2] ACPI: DBGP/DBG2 early console support for LPIA.

2012-09-27 Thread Lv Zheng
are reviewed internally in Intel. This patch set keeps the version number to track the history that is known to Intel internal developers. Version 4 of this patch set fixed bunch of CodingStyle issues. Lv Zheng (2): ACPI: Add early console framework for DBGP/DBG2. ACPI: Add Intel MID SPI early

[PATCH v4 2/2] ACPI: Add Intel MID SPI early console support.

2012-09-27 Thread Lv Zheng
. Signed-off-by: Lv Zheng lv.zh...@intel.com --- Documentation/kernel-parameters.txt|1 + arch/x86/Kconfig.debug | 23 +++ arch/x86/include/asm/mrst.h|2 +- arch/x86/kernel/early_printk.c | 12 +- arch/x86/platform/mrst

[PATCH v4 1/2] ACPI: Add early console framework for DBGP/DBG2.

2012-09-27 Thread Lv Zheng
Microsoft Debug Port Table (DBGP or DBG2) is required for Windows SoC platforms. This patch is introduced to fix the gap between Windows and Linux. Signed-off-by: Lv Zheng lv.zh...@intel.com --- Documentation/kernel-parameters.txt |1 + arch/x86/Kconfig.debug | 15 +++ arch

[PATCH v5 1/2] ACPI: Add early console framework for DBGP/DBG2.

2012-10-08 Thread Lv Zheng
by the checkpatch.pl. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Len Brown len.br...@intel.com Reviewed-by: Rui Zhang rui.zh...@intel.com Reviewed-by: Ying Huang ying.hu...@intel.com Reviewed-by: Konrad Rzeszutek Wilk kon...@kernel.org --- Documentation/kernel-parameters.txt |1 + arch

[PATCH v5 2/2] ACPI: Add Intel MID SPI early console support.

2012-10-08 Thread Lv Zheng
Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Feng Tang feng.t...@intel.com --- Documentation/kernel-parameters.txt|1 + arch/x86/Kconfig.debug | 23 +++ arch/x86/include/asm/mrst.h|2 +- arch/x86/kernel/early_printk.c

[PATCH v6 1/2] ACPI: Add early console framework for DBGP/DBG2.

2012-10-09 Thread Lv Zheng
by the kstrtoul in the x86 specific booting codes. The kstrtoul will return error on strings like acpi0,keep. This will leave one CodingStyle issue reported by the checkpatch.pl. Signed-off-by: Lv Zheng lv.zh...@intel.com --- Documentation/kernel-parameters.txt |1 + arch/x86/Kconfig.debug

[PATCH v6 2/2] ACPI: Add Intel MID SPI early console support.

2012-10-09 Thread Lv Zheng
earlycon (on CLOVERVIEW platforms): Enable the following kernel configurations: CONFIG_EARLY_PRINTK_ACPI=y CONFIG_EARLY_PRINTK_INTEL_MID_SPI=y Pass the following kernel parameter to the kernel: earlyprintk=acpi Signed-off-by: Lv Zheng lv.zh...@intel.com --- Documentation

[RFC PATCH] Scripts: Add binary diff utility.

2012-12-18 Thread Lv Zheng
This utility is used as part of Linux ACPICA release process. It may be a good idea to add it to kernel scripts, since it may be generally usefull for verifying small kernel changes, like coding style cleanups etc. Signed-off-by: Lv Zheng lv.zh...@intel.com --- scripts/diffvmlinux.sh | 227

[PATCH 0/4] ACPI: Cleanup header inclusions.

2013-11-22 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com ACPICA header files are lacking in stub protections. This makes all ACPICA header files could only be included for CONFIG_ACPI=y environment. This infects new ACPI prototypes, if such prototypes referenced ACPICA defined types, they must be incldued only

[PATCH 1/4] ACPICA: Linux: Cleanup wrong ACPICA inclusions.

2013-11-22 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com The header file acpi/acpi.h is the top level header for other kernel subsystems to include. It contains environemnt settings and architecture specific implementation that should be included before including other ACPICA headers in order to keep a consistent

[PATCH 2/4] ACPI: Cleanup acpi/acpi_bus.h and acpi/acpi_drivers.h inclusions.

2013-11-22 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com This patch enfoces linux/acpi.h inclusion instead of direct acpi/acpi_drivers.h and acpi/acpi_bus.h inclusions. It's required that acpi/acpi_bus.h included prior than acpi/acpi_drivers.h to find declarations for acpi_pci_root. It is required that acpi/acpi.h

[PATCH 3/4] ACPICA: Cleanup acpi/acpi.h inclusions.

2013-11-22 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com This patch cleans up acpi/acpi.h inclusions. 1. For files where linux/acpi.h is already included, this patch cleans up them by deleting acpi/acpi.h inclusions. Note that if acpi/acpi.h is included before including linux/acpi.h in the original file

[PATCH 4/4] ACPI: Add support to force header inclusion rules for linux/acpi.h.

2013-11-22 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com As there is only CONFIG_ACPI=n processing in the linux/acpi.h, it is not safe to include acpi/acpi.h, acpi/acpi_drivers.h and acpi/acpi_bus.h directly for source out of Linux ACPI subsystems. This patch adds error messaging to warn developers of such wrong

[PATCH 2/3] ACPI/SFI: Fix wrong acpi/acpi.h inclusion in SFI/ACPI wrapper - acpi_disabled linkage.

2013-12-03 Thread Lv Zheng
if (!acpi_disabled) will not be linked in. This patch fixes this issue by introducing a stub for MCFG entry checker is_acpi_reserved() in !CONFIG_ACPI builds. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Bjorn Helgaas bhelg...@google.com Cc: Len Brown l...@kernel.org Cc: Feng Tang feng.t

[RFC PATCH 3/3] ACPI/IBFT: Fix wrong acpi/acpi.h inclusion in iSCSI boot firmware module.

2013-12-03 Thread Lv Zheng
...@redhat.com Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/firmware/Kconfig |2 +- include/linux/iscsi_ibft.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 0747872..a6ef6ac 100644 --- a/drivers/firmware

[PATCH 1/3] ACPI/i915: Fix wrong acpi/acpi.h inclusion in i915 opregion module.

2013-12-03 Thread Lv Zheng
into linux/acpi.h inclusions. Doclink: https://01.org/linuxgraphics/sites/default/files/documentation/acpi_igd_opregion_spec.pdf Cc: Matthew Garrett mj...@srcf.ucam.org Cc: Daniel Vetter daniel.vet...@ffwll.ch Cc: intel-...@lists.freedesktop.org Signed-off-by: Lv Zheng lv.zh...@intel.com

[UPDTE PATCH 0/3] ACPI: Cleanup direct ACPICA inclusions.

2013-12-03 Thread Lv Zheng
(Updated due to commit details attached.) The patch in the linux-pm/linux-next queue is used as an experiment to catch wrong ACPICA dependencies and inclusions: Commit: 4e8fb7987f7d0390a2e74622c7c1cbb6760c6516 From: Lv Zheng lv.zh...@intel.com Date: Tue, 3 Dec 2013 08:49:16 +0800 Subject

[PATCH v2] ACPI/i915: Fix wrong acpi/acpi.h inclusion in i915 opregion module.

2013-12-05 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com In Linux kernel, ACPICA is wrapped and safely exported by CONFIG_ACPI. So all external modules should depend on CONFIG_ACPI rather than using ACPICA header directly for stubbing. But if we moves acpi/acpi.h inclusions into #ifdef CONFIG_ACPI, build breakge can

[PATCH v3 3/6] SFI: Fix warnings reported by W=1 builds.

2013-12-06 Thread Lv Zheng
: no previous prototype for 'sfi_acpi_table_parse' [-Wmissing-prototypes] This patch fixes this existing issue. It is on top of the following commit which doesn't take care about existing issues: Commit: 4e8fb7987f7d0390a2e74622c7c1cbb6760c6516 From: Lv Zheng lv.zh...@intel.com Date: Tue, 3 Dec 2013 08

[PATCH v3 0/6] ACPI: Cleanup header inclusions.

2013-12-06 Thread Lv Zheng
Subject: [PATCH] ACPI: Clean up inclusions of ACPI header files The reset 4 commits are rebased on top of this branch thus can be applied to the branch directly. Lv Zheng (6): ACPI: Clean up incorrect inclusions of ACPICA headers ACPI: Clean up inclusions of ACPI header files SFI: Fix

[PATCH v3 4/6] ACPI/i915: Fix wrong acpi/acpi.h inclusion in i915 opregion module.

2013-12-06 Thread Lv Zheng
: Matthew Garrett mj...@srcf.ucam.org Acked-by: Daniel Vetter daniel.vet...@ffwll.ch Cc: intel-...@lists.freedesktop.org Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/apei/apei-base.c |1 - drivers/acpi/apei/apei-internal.h |1 - drivers/acpi/apei/ghes.c

[PATCH v3 2/6] ACPI: Clean up inclusions of ACPI header files

2013-12-06 Thread Lv Zheng
declarations should always be included prior to any other ACPI headers in CONFIG_ACPI builds. That also is taken care of including linux/acpi.h as appropriate. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Konrad Rzeszutek Wilk konrad.w...@oracle.com Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc

[PATCH v3 6/6] ACPI/IBFT: Fix wrong acpi/acpi.h inclusion in iSCSI boot firmware module.

2013-12-06 Thread Lv Zheng
...@redhat.com Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/firmware/Kconfig |2 +- include/linux/iscsi_ibft.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 0747872..a6ef6ac 100644 --- a/drivers/firmware

[PATCH v3 5/6] ACPI/SFI: Fix wrong acpi/acpi.h inclusion in SFI/ACPI wrapper - acpi_disabled linkage.

2013-12-06 Thread Lv Zheng
if (!acpi_disabled) will not be linked in. This patch fixes this issue by introducing a stub for MCFG entry checker is_acpi_reserved() in !CONFIG_ACPI builds. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Bjorn Helgaas bhelg...@google.com Cc: Len Brown l...@kernel.org Cc: Feng Tang feng.t

[PATCH v3 1/6] ACPI: Clean up incorrect inclusions of ACPICA headers

2013-12-06 Thread Lv Zheng
and should not be included by other kernel files: acpi/acpiosxf.h acpi/acpixf.h Clean up incorrect inclusions of these files from non-ACPICA source files. [rjw: Subject and changelog] Signed-off-by: Lv Zheng lv.zh...@intel.com Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com

[RFC PATCH 0/2] ACPICA: Updates for auto-serialization mechanism.

2014-03-16 Thread Lv Zheng
not to break users. The patch to make it default disabled is also marked as RFC. We can determine if it is needed according to the verification result. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 References: http://www.spinics.net/lists/linux-acpi/msg49496.html Lv Zheng (1): ACPI

[RFC PATCH 2/2] ACPI: Default disable auto-serialization.

2014-03-16 Thread Lv Zheng
objects. This patch disables it by default temporarily according to the bug reports. References: http://www.spinics.net/lists/linux-acpi/msg49496.html Reported-by: Valdis Kletnieks validis.kletni...@vt.edu Reported-by: Sabrina Dubroka s...@queasysnail.net Signed-off-by: Lv Zheng lv.zh...@intel.com

[RFC PATCH 1/2] ACPICA: Dispatcher: Ignore SyncLevel for auto-serialization mechanism.

2014-03-16 Thread Lv Zheng
Kletnieks validis.kletni...@vt.edu Reported-by: Sabrina Dubroka s...@queasysnail.net Signed-off-by: Bob Moore robert.mo...@intel.com Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/acpica/acobject.h |3 ++- drivers/acpi/acpica/dsmethod.c | 24 +++- 2 files changed

[PATCH 0/2] ACPICA: Preparations of acpidump release automation.

2014-02-10 Thread Lv Zheng
port them to ACPICA upstream after merging them first into Linux. Lv Zheng (2): ACPICA: acpidump: Add sparse declarators support. ACPICA: acpidump: Remove translation protection on integer types. include/acpi/actypes.h | 64 +++ include/acpi

[PATCH 2/2] ACPICA: acpidump: Remove translation protection on integer types.

2014-02-10 Thread Lv Zheng
/u32/u64/s32/s64 definitions. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com --- include/acpi/actypes.h | 64 +++ include/acpi/platform/aclinux.h |2 ++ 2 files changed

[PATCH 1/2] ACPICA: acpidump: Add sparse declarators support.

2014-02-10 Thread Lv Zheng
to be built with Linux kernel ACPICA header files included. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com --- include/acpi/platform/aclinux.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 30c9a7c..f41f59b

[PATCH 0/4] ACPICA: Stable material of ACPI executer fixes for linux-3.8.

2013-10-30 Thread Lv Zheng
There are bug-fixes for AML interpreter upstreamed, fixing some serious issues found in recent platforms. These fixes make Linux AML interpreter more ACPI 2.0 ASL concept compliant. Further AML interpreter fixes should be based on such improvements, thus they are good materials for stable. This

[PATCH 1/4] ACPICA: Interpreter: Fix Store() when implicit conversion is not possible.

2013-10-30 Thread Lv Zheng
method should be aborted in this case. However, ASLTS suite depends on this behavior. Cc: sta...@vger.kernel.org # 3.8.x Signed-off-by: Bob Moore robert.mo...@intel.com Signed-off-by: Lv Zheng lv.zh...@intel.com Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com --- drivers/acpi/acpica

[PATCH 2/4] ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and BufferField refs.

2013-10-30 Thread Lv Zheng
in Windows7 but not Windows8. Cc: sta...@vger.kernel.org # 3.8.x: 3f654ba: ACPICA: Interpreter: Fix Cc: sta...@vger.kernel.org # 3.8.x Signed-off-by: Bob Moore robert.mo...@intel.com Signed-off-by: Lv Zheng lv.zh...@intel.com Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com --- drivers

[PATCH 4/4] ACPICA: Fix for a Store-ArgX when ArgX contains a reference to a field.

2013-10-30 Thread Lv Zheng
...@intel.com Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/acpica/exstore.c | 166 + 1 file changed, 102 insertions(+), 64 deletions(-) diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c index 4ff37e8..cd7079d 100644

[PATCH 3/4] ACPICA: Return error if DerefOf resolves to a null package element.

2013-10-30 Thread Lv Zheng
: 3f654ba: ACPICA: Interpreter: Fix Cc: sta...@vger.kernel.org # 3.8.x: 63660e0: ACPICA: DeRefOf operator: Cc: sta...@vger.kernel.org # 3.8.x References: https://bugs.acpica.org/show_bug.cgi?id=431 Signed-off-by: Bob Moore robert.mo...@intel.com Signed-off-by: Lv Zheng lv.zh...@intel.com Signed-off

[PATCH 06/13] ACPI/IPMI: Add reference counting for ACPI operation region handlers

2013-07-23 Thread Lv Zheng
/acpi/acpi_bus.h should contain the declarations that have references to some ACPICA defined types. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/acpi_ipmi.c | 16 ++-- drivers/acpi/osl.c | 224

[PATCH 01/13] ACPI/IPMI: Fix potential response buffer overflow

2013-07-23 Thread Lv Zheng
in the response handling codes. This patch fixes this gap and also combines rx_data/tx_data to use single data/len pair since they need not be seperated. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/acpi_ipmi.c | 100

[PATCH 13/13] ACPI/IPMI: Add IPMI operation region test device driver

2013-07-23 Thread Lv Zheng
This patch is only used for test purpose and should not be merged by any public Linux kernel repositories. This patch contains one driver that can drive a fake test device accessing IPMI operation region fields. Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/Kconfig | 68

[PATCH 12/13] Testing: Add module load/unload test suite

2013-07-23 Thread Lv Zheng
if races will happen. Signed-off-by: Lv Zheng lv.zh...@intel.com --- tools/testing/module-unloading/endless_cat.sh | 32 ++ tools/testing/module-unloading/endless_mod.sh | 81 + 2 files changed, 113 insertions(+) create mode 100755 tools/testing/module

[PATCH 10/13] ACPI/IPMI: Cleanup some inclusion codes

2013-07-23 Thread Lv Zheng
This is a trivial patch: 1. Deletes several useless header inclusions. 2. Kernel codes should always include linux/acpi.h instead of acpi/acpi_bus.h or acpi/acpi_drivers.h where many conditional declarations are handled. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Huang Ying

[PATCH 11/13] ACPI/IPMI: Cleanup some Kconfig codes

2013-07-23 Thread Lv Zheng
This is a trivial patch: 1. Deletes duplicate Kconfig dependency as there is if IPMI_HANDLER around IPMI_SI. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/Kconfig |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 04/13] ACPI/IPMI: Fix race caused by the unprotected ACPI IPMI user

2013-07-23 Thread Lv Zheng
in the reference counting style. Authorship is also updated due to this design change. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Zhao Yakui yakui.z...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/acpi_ipmi.c | 249 +++--- 1

[PATCH 05/13] ACPI/IPMI: Fix issue caused by the per-device registration of the IPMI operation region handler

2013-07-23 Thread Lv Zheng
://bugzilla.kernel.org/show_bug.cgi?id=46741 Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Zhao Yakui yakui.z...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/acpi_ipmi.c | 111 +++--- 1 file changed, 55 insertions(+), 56 deletions

[PATCH 09/13] ACPI/IPMI: Cleanup some initialization codes

2013-07-23 Thread Lv Zheng
This is a trivial patch. 1. Changes dynamic mutex initialization to static initialization. 2. Removes one acpi_ipmi_init() variable initialization as it is not needed. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/acpi_ipmi.c |7

[PATCH 00/13] ACPI/IPMI: Fix several issues in the current codes

2013-07-23 Thread Lv Zheng
on such platform. No races can be found and the IPMI operation region handler is functioning now. It is not possible to test module(ipmi_si) load/unload as it can't be unloaded due to its' transfer flushing implementation. Lv Zheng (13): ACPI/IPMI: Fix potential response buffer overflow ACPI/IPMI

[PATCH 03/13] ACPI/IPMI: Fix race caused by the unprotected ACPI IPMI transfers

2013-07-23 Thread Lv Zheng
() and tx_msg accesses. Calling smp_wmb() before setting msg_done flag so that messages completed due to flushing will not be handled as 'done' messages while their contents are not vaild. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Zhao Yakui yakui.z...@intel.com Reviewed-by: Huang Ying ying.hu

[PATCH 08/13] ACPI/IPMI: Cleanup several acpi_ipmi_device members

2013-07-23 Thread Lv Zheng
This is a trivial patch: 1. Deletes a member of the acpi_ipmi_device - smi_data which is not actually used. 2. Updates a member of the acpi_ipmi_device - pnp_dev which is only used by dev_warn() invocations, so changes it to struct device. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed

[PATCH 07/13] ACPI/IPMI: Add reference counting for ACPI IPMI transfers

2013-07-23 Thread Lv Zheng
3. with this patch applied, tx_msg_lock is always leaf: irq_context: 0 [82767b40] buffer-mutex [a00a66d8] s_active#107 [a07ecdc8] (ipmi_device-tx_msg_lock)-rlock irq_context: 1 [a07ecdc8] (ipmi_device-tx_msg_lock)-rlock Signed-off-by: Lv Zheng lv.zh

[PATCH 02/13] ACPI/IPMI: Fix atomic context requirement of ipmi_msg_handler()

2013-07-23 Thread Lv Zheng
created by ACPI, performance of current solution may be OK. It can be better via linking ipmi_recv_msg into an RX message queue and process it in other contexts. Signed-off-by: Lv Zheng lv.zh...@intel.com Reviewed-by: Huang Ying ying.hu...@intel.com --- drivers/acpi/acpi_ipmi.c | 24

[PATCH 1/7] ACPI/EC: Fix an issue that advance_transaction() processes stale hardware status.

2014-06-13 Thread Lv Zheng
. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=70891 Signed-off-by: Lv Zheng lv.zh...@intel.com Reported-and-tested-by: Gareth Williams gar...@garethwilliams.me.uk Tested-by: Steffen Weber steffen.we...@gmail.com [zetalog: first affected by:] Cc: sta...@vger.kernel.org # 2.6.11: 7c6db4e0: ACPI: EC

[PATCH 2/7] ACPI/EC: Add asynchronous command byte write support.

2014-06-13 Thread Lv Zheng
the availability of writing the first command byte. A new command can utilize this flag to compete for the right of accessing the underlying hardware. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=70891 Signed-off-by: Lv Zheng lv.zh...@intel.com Reported-and-tested-by: Gareth Williams gar

[PATCH 3/7] ACPI/EC: Remove duplicated ec_wait_ibf0() waiter.

2014-06-13 Thread Lv Zheng
=0 interrupt or timed out and retried again in the task context. This patch removes this seperate and duplicate IBF=0 waiter, by doing so, we can reduce the overall number of times to access the EC_SC(R) status register. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=70891 Signed-off-by: Lv

[PATCH 4/7] ACPI/EC: Fix a race condition in ec_transaction_completed().

2014-06-13 Thread Lv Zheng
-curr is ensured to be !NULL. After cleaning up, the EVT_SCI=1 check should be moved out of the wakeup condition so that an EVT_SCI raised with (ec-curr == NULL) can trigger a QR_SC command. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=70891 Signed-off-by: Lv Zheng lv.zh...@intel.com Reported

[PATCH 5/7] ACPI/EC: Update revision due to full asynchrnous command support.

2014-06-13 Thread Lv Zheng
: Commit: 7c6db4e050601f359081fde418ca6dc4fc2d0011 Subject: ACPI: EC: do transaction from interrupt context Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/ec.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi

[PATCH 6/7] ACPICA: Events: Fix edge-triggered GPE by disabling before acknowledging it.

2014-06-13 Thread Lv Zheng
Due to ACPI specificiation 5, chapter 5.6.4 General-Purpose Event Hnadling, OSPMs need to disable GPE before clearing the status bit for edge-triggered GPEs. Signed-off-by: Lv Zheng lv.zh...@intel.com Tested-by: Gareth Williams gar...@garethwilliams.me.uk Tested-by: Steffen Weber steffen.we

[PATCH 7/7] ACPI/EC: Add detailed fields debugging support of EC_SC(R).

2014-06-13 Thread Lv Zheng
Developers really don't need to translate EC_SC(R) in mind as long as the field details are decoded in the debugging message. Signed-off-by: Lv Zheng lv.zh...@intel.com Tested-by: Gareth Williams gar...@garethwilliams.me.uk Tested-by: Steffen Weber steffen.we...@gmail.com --- drivers/acpi/ec.c

[PATCH 0/7] ACPI/EC: Critical bug fixes related to EC and event handling.

2014-06-13 Thread Lv Zheng
, the other for the kernel versions that can have these stable materials cleanly applied. Lv Zheng (7): ACPI/EC: Fix an issue that advance_transaction() processes stale hardware status. ACPI/EC: Add asynchronous command byte write support. ACPI/EC: Remove duplicated ec_wait_ibf0() waiter

[PATCH] ACPI: Cleanup for acpi_os_map/unmap_memory() to eliminate __iomem.

2014-05-20 Thread Lv Zheng
in assignment (different address spaces) drivers/acpi/acpica/tbxfroot.c:195:30: warning: incorrect type in argument 1 (different address spaces) And ACPICA external usages are not affected. [zetalog: based on linux-pm.git/bleeding-edge] Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi

[RFC PATCH 0/6] ACPICA: 64bit FADT addresses enabling.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com This series enable 64-bit addresses on top of linux-pm.git/linux-next. Commit 0249ed2444d6 (ACPICA: Add option to favor 32-bit FADT addresses.) breaks resuming from system-suspend on the Intel DP45SG board. This is because the commit has changed the default

[RFC PATCH 1/6] ACPICA: Hardware: Reduce divergences for sleep functions.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com This patch is generated to reduce source code differences between Linux and ACPICA so that further sleep related modifications can be applied directly without human interventions. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Oswald Buddenhagen o

[RFC PATCH 2/6] ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACS.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com The root cause of the reported bug might be one of the followings: 1. BIOS may favor the 64-bit firmware waking vector address when the version of the FACS is greater than 0 and Linux currently only supports resuming from the real mode, so the 64-bit

[RFC PATCH 3/6] ACPI: sleep: Update acpi_set_firmware_waking_vector() invocations to favor 32-bit firmware waking vector.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com This patch updates acpi_set_firmware_waking_vector() invocations in order to keep 32-bit firmware waking vector favor for Linux. 64-bit firmware waking vector has never been enabled by Linux. The (acpi_physical_address)0 for 64-bit address can be used to force

[RFC PATCH 6/6] ACPICA: Tables: Enable default 64-bit FADT addresses favor.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com With enough protections, this patch re-enables 64-bit FADT addresses by default. If regressions are reported against such change, this patch should be bisected and reverted. Note that 64-bit FACS favor and 64-bit firmware waking vector favor are excluded

[RFC PATCH 5/6] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com The root cause of the reported bug might be one of the followings: 1. BIOS may favor the 64-bit firmware waking vector address when the version of the FACS is greater than 0 and Linux currently only supports resuming from the real mode, so the 64-bit

[RFC PATCH 4/6] ACPICA: Tables: Enable both 32-bit and 64-bit FACS.

2014-05-27 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com The root cause of the reported bug might be one of the followings: 1. BIOS may favor the 64-bit firmware waking vector address when the version of the FACS is greater than 0 and Linux currently only supports resuming from the real mode, so the 64-bit

[PATCH v3 0/4] ACPICA: Cleanups for acpi/platform/acenv.h and acpi/platform/aclinux.h.

2014-05-12 Thread Lv Zheng
All platform drivers All ACPI drivers 4 DRM drivers that implement ACPI opregion All buses with ACPI bindings All cpufreq configurations All xen configurations All ACPI table drivers Lv Zheng (4): ACPICA: Linux headers: Remove ACPI_PREEMPTION_POINT() due to no usages

[PATCH v3 2/4] ACPICA: Linux headers: Add acpi/platform/aclinuxex.h to remove mis-ordered inclusion of acpi/actypes.h from acpi/platform/aclinux.h.

2014-05-12 Thread Lv Zheng
of acpi/actypes.h can be removed from acpi/platform/aclinux.h. This patch also removes old ACPI_NATIVE_INTERFACE_HEADER mechanism which is not preferred by Linux and adds the platform/acenvex.h to be the solution to solve this issue. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com --- include

[PATCH v3 4/4] ACPICA: Cleanup redudant definitions that already have defaults in acpi/platform/acenv.h.

2014-05-12 Thread Lv Zheng
Since mis-order issues have been solved, we can cleanup redundant definitions that already have defaults in acpi/platform/acenv.h. This patch removes redudant environments for __KERNEL__ surrounded code. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu

[PATCH v3 1/4] ACPICA: Linux headers: Remove ACPI_PREEMPTION_POINT() due to no usages.

2014-05-12 Thread Lv Zheng
This patch deletes deprecated ACPI_PREEMPTION_POINT(), there is no user for it in Linux kernel now. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com --- include/acpi/platform/aclinux.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/acpi/platform/aclinux.h b

[PATCH v3 3/4] ACPICA: Linux headers: Add asm/acenv.h to remove mis-ordered inclusion of asm/acpi.h from acpi/platform/aclinux.h.

2014-05-12 Thread Lv Zheng
this issue. Signed-off-by: Lv Zheng lv.zh...@intel.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: linux-i...@vger.kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: x...@kernel.org --- arch/ia64/include

[PATCH v3 2/2] ACPI: Fix the issue that the DSDT local copy is conflict with the customized DSDT.

2014-05-12 Thread Lv Zheng
This patch fixes the following issue: If DSDT is customized, no local DSDT copy is needed. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=69711 Signed-off-by: Lv Zheng lv.zh...@intel.com Signed-off-by: Enrico Etxe Arte goitizena.gene...@gmail.com Cc: sta...@vger.kernel.org # 2.6.35.x

[PATCH v3 1/2] ACPI: Cleanup to convert acpi.no_static_ssdt into a compile-time configurable.

2014-05-12 Thread Lv Zheng
/show_bug.cgi?id=3774 Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=69711 Original-by: Enrico Etxe Arte goitizena.gene...@gmail.com Signed-off-by: Lv Zheng lv.zh...@intel.com --- Documentation/kernel-parameters.txt | 10 -- drivers/acpi/Kconfig| 32

[PATCH] Tables: Restore old behavor to favor 32-bit FADT addresses.

2014-05-13 Thread Lv Zheng
We need to find a smarter way to switch to 64-bit FADT addresses according to the bug report. This patch reverts Linux to the original behavior. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=74021 Reported-by: Oswald Buddenhagen o...@kde.org Signed-off-by: Lv Zheng lv.zh...@intel.com

[PATCH v2 0/7] ACPI/EC: Critical bug fixes related to EC and event handling.

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com History: v1: The collection of bug-fixes from kernel bugzilla bug 70891. v2: 1. Improves the patch descriptions to make the root cause of the 70891 bug more correct. 2. Improves a race fix to make it more robust. This patchset fixes the following issues

[PATCH v2 2/7] ACPI/EC: Add asynchronous command byte write support.

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com This patch moves the first command byte write into advance_transaction() so that all EC register accesses that can affect the command processing state machine can happen in this asynchronous state machine advancement function. The advance_transaction() function

[PATCH v2 1/7] ACPI/EC: Fix an issue that advance_transaction() processes stale hardware status.

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com The advance_transaction() will be invoked from the IRQ context GPE handler and the task context ec_poll(). The handling of this function is locked so that the EC state machine are ensured to be advanced sequentially. But there is a problem. Before invoking

[PATCH v2 5/7] ACPI/EC: Update revision due to full asynchrnous command support.

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com The bug fixes and asynchronous improvements have been done to the EC driver by the previous commits. This patch increases the revision to 2.2 to indicate the behavior differences between the old and the new drivers. The copyright/authorship notices are also

[PATCH v2 3/7] ACPI/EC: Remove duplicated ec_wait_ibf0() waiter.

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com After we've added the first command byte write into advance_transaction(), the IBF=0 waiter is duplicated with the command completion waiter implemented in the ec_poll() because: If IBF=1 blocked the first command byte write invoked in the task context

[PATCH v2 4/7] ACPI/EC: Fix a race condition in ec_transaction_completed().

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com There is a race condition in ec_transaction_completed(). When ec_transaction_completed() is called in the GPE handler, it could return true because of (ec-curr == NULL). Then the wake_up() invocation could complete the next command unexpectedly since

[PATCH v2 7/7] ACPI/EC: Add detailed fields debugging support of EC_SC(R).

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com Developers really don't need to translate EC_SC(R) in mind as long as the field details are decoded in the debugging message. Signed-off-by: Lv Zheng lv.zh...@intel.com Tested-by: Gareth Williams gar...@garethwilliams.me.uk Tested-by: Steffen Weber steffen.we

[PATCH v2 6/7] ACPICA: Events: Fix edge-triggered GPE by disabling before acknowledging it.

2014-06-14 Thread Lv Zheng
From: Lv Zheng lv.zh...@intel.com Due to ACPI specificiation 5, chapter 5.6.4 General-Purpose Event Hnadling, OSPMs need to disable GPE before clearing the status bit for edge-triggered GPEs. Signed-off-by: Lv Zheng lv.zh...@intel.com Tested-by: Gareth Williams gar...@garethwilliams.me.uk Tested

[PATCH 5/9] ACPICA: Events: Reduce divergences to honor notify handler enabled GPEs.

2014-06-17 Thread Lv Zheng
The back port result of a divergence fix that the origianlly_enabled check is not paired between acpi_install_gpe_handler() and acpi_remove_gpe_handler(). Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/acpica/evxface.c | 19 ++- 1 file changed, 14

[PATCH 0/9] ACPI/EC: Improve GPE handling model.

2014-06-17 Thread Lv Zheng
implemented. Test results show that the GPE APIs and EC GPE model are now safe for hotplug support. Lv Zheng (9): ACPICA: Events: Reduce indent divergences of events files. ACPICA: Events: Fix an issue that GPE APIs cannot be invoked in atomic context. ACPICA: Events: Introduce acpi_set_gpe

[PATCH 3/9] ACPICA: Events: Introduce acpi_set_gpe()/acpi_finish_gpe() to reduce divergences.

2014-06-17 Thread Lv Zheng
. This driver provided lock is safe to be held in the GPE handler by the driver. Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/acpica/evxfgpe.c | 105 + 1 file changed, 105 insertions(+) diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi

[PATCH 6/9] ACPI/EC: Introduce STARTED/STOPPED flags to replace BLOCKED flag.

2014-06-17 Thread Lv Zheng
By using the 2 flags, we can indicate an inter-mediate state where the current transactions should be completed while the new transactions should be blocked. Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/ec.c | 56 +++-- 1 file

[PATCH 8/9] ACPI/EC: Deploy the new GPE handling model.

2014-06-17 Thread Lv Zheng
: + Stopping EC + [ 24.950836] ACPI : EC: + EC stopped + Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/ec.c | 82 ++--- 1 file changed, 65 insertions(+), 17 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi

[PATCH 7/9] ACPI/EC: Add detailed command/query debugging information.

2014-06-17 Thread Lv Zheng
Developers really don't need to translate EC commands in mind. This patch adds detailed debugging information for the EC commands. The address can be found in the follow-up sequential EC_DATA(W) accesses, thus this patch also removes some of the redundant address information. Signed-off-by: Lv

[PATCH 9/9] ACPI/EC: Add unit test support for EC driver hotplug.

2014-06-17 Thread Lv Zheng
This patch adds facility to test future EC modification. All EC commits should enable TEST_HOTPLUG, and try a build/boot test. Since EC is currently a built-in module, this is the only mean for us to test the hotplug code. Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/ec.c | 19

[PATCH 2/9] ACPICA: Events: Fix an issue that GPE APIs cannot be invoked in atomic context.

2014-06-17 Thread Lv Zheng
cases. This patch adds reference counting for struct acpi_gpe_handler_info. Then the GPE handler can be safely invoked without holding the GPE lock, thus facilitates GPE APIs to be invoked in any atomic environment. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/acpica

[PATCH 1/9] ACPICA: Events: Reduce indent divergences of events files.

2014-06-17 Thread Lv Zheng
-off-by: Lv Zheng lv.zh...@intel.com --- drivers/acpi/acpica/aclocal.h |4 ++-- drivers/acpi/acpica/evgpe.c | 18 +- drivers/acpi/acpica/evxface.c |8 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi

[PATCH 4/9] ACPICA: Events: Remove acpi_ev_enable_gpe().

2014-06-17 Thread Lv Zheng
by suspend/resume code, GPE status shouldn't be cleared, or a GPE loss could happen when the driver relies on the interrupt mode. With previous cleanup, all acpi_ev_enable_gpe() usages are removed, this patch also removes this internal API. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com

[RFC PATCH 02/15] ACPICA: Linux: Add configurability for external globals.

2013-12-18 Thread Lv Zheng
OSPMs like Linux trend to include all header files but leave empty inline stub variables for a feature that is not configured during build. This patch configures ACPICA external globals out and defines them into immediates when CONFIG_ACPI is not enabled. Lv Zheng. Known issues: 1. No possible

[RFC PATCH 03/15] ACPICA: Linux: Add configurability for OSL APIs.

2013-12-18 Thread Lv Zheng
is generated in the assumption that all ACPICA OSL APIs should only be used by ACPICA itself. While the real world is there are some external ACPICA macros called ACPICA OSL APIs. This patch doesn't include protections around the OSL APIs that are used by such ACPICA external macros. Lv Zheng. Signed-off

[RFC PATCH 00/15] ACPICA: Add CONFIG_ACPI=n build support for ACPICA header files.

2013-12-18 Thread Lv Zheng
a .c file invoking all ACPICA globals, functions, macros and built it with and without CONFIG_ACPI enabled. Lv Zheng (15): ACPICA: OSL: Add configurability mechanism for global variables. ACPICA: Linux: Add configurability for external globals. ACPICA: Linux: Add configurability for OSL APIs

[RFC PATCH 11/15] ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics.

2013-12-18 Thread Lv Zheng
This patch adds default 64-bit mathematics in aclinux.h using do_div. As do_div can be used for all Linux architectures, this can also be used as stub macros for ACPICA 64-bit mathematics. Signed-off-by: Lv Zheng lv.zh...@intel.com --- arch/ia64/include/asm/acenv.h |2 ++ arch/x86/include

[RFC PATCH 10/15] ACPICA: Linux: Add architecture specific ACPICA headers in Linux.

2013-12-18 Thread Lv Zheng
this. Signed-off-by: Lv Zheng lv.zh...@intel.com --- arch/ia64/include/asm/acenv.h | 71 +++ arch/ia64/include/asm/acpi.h| 50 --- arch/x86/include/asm/acenv.h| 66 arch/x86/include/asm

[RFC PATCH 14/15] ACPI/SFI: Fix wrong acpi/acpi.h inclusion in SFI/ACPI wrapper - table definitions.

2013-12-18 Thread Lv Zheng
This patch removes acpi/acpi.h inclusions from linux/sfi_acpi.h as linux/acpi.h has already included it for CONFIG_ACPI=n builds. Cc: Bjorn Helgaas bhelg...@google.com Cc: Len Brown l...@kernel.org Cc: sfi-de...@simplefirmware.org Cc: linux-...@vger.kernel.org Signed-off-by: Lv Zheng lv.zh

[RFC PATCH 09/15] ACPICA: Linux: Add stub support for Linux specific variables and functions.

2013-12-18 Thread Lv Zheng
There are global variables and functions not upstreamed to the ACPICA code base. Such symbols still can referenced by external users as they are listed in the acpixf.h. This patch uses ACPI_GLOBAL and ACPI_EXTERNAL_RETURN_STATUS mechanism to add stub support for such symbols. Signed-off-by: Lv

[RFC PATCH 07/15] ACPICA: OSL: Add configurability mechanism for external APIs.

2013-12-18 Thread Lv Zheng
difficult as the linuxized commits will be messed up in addition to the normal line offsettings by the patch/diff based utilities. Lv Zheng. Signed-off-by: Lv Zheng lv.zh...@intel.com --- include/acpi/acpixf.h | 33 ++--- include/acpi/platform/aclinux.h

  1   2   3   4   5   6   7   8   9   10   >