[RFC V2] init: support device of major:minor:offset format

2015-05-05 Thread Chen Yu
. Reported-by: Prigent Christophe christophe.prig...@intel.com Reported-by: Martin Steigerwald mar...@lichtvoll.de Signed-off-by: Chen Yu yu.c.c...@intel.com --- init/do_mounts.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init/do_mounts.c b/init/do_mounts.c index 8369ffa

[PATCH] [v3] x86, suspend: Save/restore THERM_CONTROL register for suspend

2015-08-22 Thread Chen Yu
common code path. And because THERM_CONTROL might not be available or readable in any situation, we use rdmsrl_safe to safely save these MSR registers. Tested-by: Marcin Kaszewski marcin.kaszew...@intel.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- v3: - Simplify the patch to only focus

[PATCH] [v2] x86, suspend: Save/restore extra MSR registers for suspend

2015-08-21 Thread Chen Yu
-by: Chen Yu yu.c.c...@intel.com --- v2: - Cover both 64/32-bit common code path. Use rdmsrl_safe to safely read MSR. Introduce a quirk framework for save/restore specified MSR on different platforms. --- arch/x86/include/asm/suspend_32.h | 12 + arch/x86/include/asm/suspend_64.h | 12

[PATCH] [v4] surface pro 3: Add support driver for Surface Pro 3 buttons

2015-08-18 Thread Chen Yu
...@picnicpark.org Tested-by: Donavan Lance tusklah...@gmail.com Tested-by: Stephen Just stephenj...@gmail.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- v4: - Add following code in driver's probe callback: if (strncmp(acpi_device_bid(device), SURFACE_BUTTON_OBJ_NAME, strlen

[PATCH] x86, suspend: Save/restore THERM_CONTROL register for suspend

2015-08-17 Thread Chen Yu
, it would be more robust for linux to deal with this situation. This patch fixes this issue by saving/restoring THERM_CONTROL(now called CLOCK_MODULATION) register on suspend/resume. Tested-by: Marcin Kaszewski marcin.kaszew...@intel.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- arch/x86/include

[PATCH] surface pro 3: Add support driver for Surface Pro 3 buttons

2015-08-05 Thread Chen Yu
...@picnicpark.org Tested-by: Donavan Lance tusklah...@gmail.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- MAINTAINERS | 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86

[PATCH] [v2] surface pro 3: Add support driver for Surface Pro 3 buttons

2015-08-07 Thread Chen Yu
...@picnicpark.org Tested-by: Donavan Lance tusklah...@gmail.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- MAINTAINERS | 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86

[PATCH][rfc] intel_pstate: Fix user input of min/max to legal policy region

2015-08-11 Thread Chen Yu
. This patch solves this problem by clamping min_perf_pct and max_perf_pct to be strictly inside [min_policy_pct,max_policy_pct]. Signed-off-by: Chen Yu yu.c.c...@intel.com --- drivers/cpufreq/intel_pstate.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq

[PATCH][RFC] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle

2015-08-09 Thread Chen Yu
marking the acpi_gbl_FADT.sci_interrupt. Signed-off-by: Chen Yu yu.c.c...@intel.com --- drivers/acpi/osl.c | 5 - drivers/acpi/sleep.c | 20 ++-- drivers/acpi/sleep.h | 5 + 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi

[PATCH] [v3] surface pro 3: Add support driver for Surface Pro 3 buttons

2015-08-10 Thread Chen Yu
...@picnicpark.org Tested-by: Donavan Lance tusklah...@gmail.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- v3: - Revert handle_surface_button_notify and keep original 'switch/case' in surface_button_notify. Add/fix some comments for surface_button_notify. v2: - Introduce MACRO

[PATCH 1/3][v2] ACPI: Using correct irq when uninstalling acpi irq handler

2015-10-24 Thread Chen Yu
. Cc: <sta...@vger.kernel.org> # 2.6.39 Acked-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/acpi/osl.c | 10 +++--- include/linux/acpi.h | 6 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/os

[PATCH 2/3][v2] ACPI: Using correct irq when waiting for events

2015-10-24 Thread Chen Yu
When system is waiting for GPE/fixed event handler to finish, it uses the acpi_gbl_FADT.sci_interrupt directly. However, we should use mapped irq returned by acpi_gsi_to_irq for synchronize_hardirq. Cc: <sta...@vger.kernel.org> # 3.19+ Acked-by: Lv Zheng <lv.zh...@intel.com> Signed-

[PATCH 3/3][v2] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle

2015-10-24 Thread Chen Yu
, rather than marking the acpi_gbl_FADT.sci_interrupt. Cc: <sta...@vger.kernel.org> # 3.18+ Acked-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/acpi/sleep.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH 0/3][v2] Fix incorrect using of acpi irq

2015-10-24 Thread Chen Yu
This series of patches are trying to convert codes who use acpi_gbl_FADT.sci_interrupt incorrectly to use the right irq mapped by acpi_gsi_to_irq. Chen Yu (3): ACPI: Using correct irq when uninstalling acpi irq handler ACPI: Using correct irq when waiting for events ACPI / PM: Fix incorrect

[PATCH 0/3] Fix incorrect using of acpi irq

2015-10-22 Thread Chen Yu
This series of patches are trying to convert codes who use acpi_gbl_FADT.sci_interrupt incorrectly to use the right irq mapped by acpi_gsi_to_irq. Chen Yu (3): ACPI: Using correct irq when uninstalling acpi irq handler ACPI: Using correct irq when waiting for events ACPI / PM: Fix incorrect

[PATCH 1/3] ACPI: Using correct irq when uninstalling acpi irq handler

2015-10-22 Thread Chen Yu
. Cc: <sta...@vger.kernel.org> # 2.6.39+ Acked-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/acpi/osl.c | 10 +++--- include/linux/acpi.h | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/os

[PATCH 2/3] ACPI: Using correct irq when waiting for events

2015-10-22 Thread Chen Yu
When system is waiting for GPE/fixed event handler to finish, it uses the acpi_gbl_FADT.sci_interrupt directly. However, we should use mapped irq returned by acpi_gsi_to_irq for synchronize_hardirq. Cc: <sta...@vger.kernel.org> # 3.19+ Acked-by: Lv Zheng <lv.zh...@intel.com> Signed-

[PATCH 3/3] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle

2015-10-22 Thread Chen Yu
marking the acpi_gbl_FADT.sci_interrupt. Cc: <sta...@vger.kernel.org> # 3.18+ Acked-by: Lv Zheng <lv.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/acpi/sleep.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/slee

[PATCH 0/3][v2] Fix thermal problems during suspend/bootup

2015-10-25 Thread Chen Yu
zone's registration, current thermal framework forgets to update the thermal_zone's status, which might bring expected behavior under special cases. Chen Yu (3): Thermal: initialize thermal zone device correctly Thermal: handle thermal zone device properly during system sleep Thermal: do

[PATCH 1/3][v2] Thermal: initialize thermal zone device correctly

2015-10-25 Thread Chen Yu
ause <manuelkra...@netscape.net> Tested-by: szegad <szega...@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Tested-by: Matthias <morpheusxyz...@yahoo.de> Reviewed-by: Javi Merino <javi.mer...@arm.com> Signed-off-by: Zha

[PATCH 3/3][v2] Thermal: do thermal zone update after a cooling device registered

2015-10-25 Thread Chen Yu
@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Signed-off-by: Zhang Rui <rui.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/thermal/thermal_core.c | 14 +- include/linux/th

[PATCH 2/3][v2] Thermal: handle thermal zone device properly during system sleep

2015-10-25 Thread Chen Yu
gt; Tested-by: szegad <szega...@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Tested-by: Matthias <morpheusxyz...@yahoo.de> Signed-off-by: Zhang Rui <rui.zh...@intel.com> Signed-off-by: Chen Yu <

[PATCH][v6] x86, suspend: Save/restore extra MSR registers for suspend

2015-11-17 Thread Chen Yu
com> Acked-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Acked-by: Pavel Machek <pa...@ucw.cz> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- arch/x86/include/asm/msr.h| 10 + arch/x86/include/asm/suspend_32.h | 1 + arch/x86/include/asm/suspend_64.h | 1

[PATCH 2/3][v3] Thermal: handle thermal zone device properly during system sleep

2015-10-30 Thread Chen Yu
gt; Tested-by: szegad <szega...@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Tested-by: Matthias <morpheusxyz...@yahoo.de> Reviewed-by: Javi Merino <javi.mer...@arm.com> Signed-off-by: Zhang Rui <rui

[PATCH 3/3][v3] Thermal: do thermal zone update after a cooling device registered

2015-10-30 Thread Chen Yu
@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Reviewed-by: Javi Merino <javi.mer...@arm.com> Signed-off-by: Zhang Rui <rui.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/thermal/t

[PATCH 0/3][v3] Fix thermal problems during suspend/bootup

2015-10-30 Thread Chen Yu
zone's registration, current thermal framework forgets to update the thermal_zone's status, which might bring expected behavior under special cases. Chen Yu (3): Thermal: initialize thermal zone device correctly Thermal: handle thermal zone device properly during system sleep Thermal: do

[PATCH 1/3][v3] Thermal: initialize thermal zone device correctly

2015-10-30 Thread Chen Yu
ause <manuelkra...@netscape.net> Tested-by: szegad <szega...@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Tested-by: Matthias <morpheusxyz...@yahoo.de> Reviewed-by: Javi Merino <javi.mer...@arm.com> Signed-off-by: Zha

[PATCH][v5] PM / hibernate: Print the possible panic reason when resuming with inconsistent e820 map

2015-10-14 Thread Chen Yu
is machine. The following e820 entries will be regarded as invalid ones: 1.E820_RAM: old region is not a subset of any current region. 2.E820_ACPI: old region is not strictly the same as any current region(example above). Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v5: - Re

[PATCH][v6] PM / hibernate: Print the possible panic reason when resuming with inconsistent e820 map

2015-10-20 Thread Chen Yu
). Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v6: - Fix some compiling errors reported by 0day/LKP, adjust Kconfig/variable namings. v5: - Rewrite this patch to just warn user of the broken BIOS when panic. v4: - Add __attribute__ ((unused)) for swsusp_page_is_valid, to elimin

[PATCH][v5] x86, suspend: Save/restore extra MSR registers for suspend

2015-10-10 Thread Chen Yu
not be available or readable in any situation, we use rdmsrl_safe to safely save these MSRs. Tested-by: Marcin Kaszewski <marcin.kaszew...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v5: - Rename some structures and variables for better understanding. Put the definati

[PATCH][v3] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle

2015-10-09 Thread Chen Yu
marking the acpi_gbl_FADT.sci_interrupt. Meanwhile this patch fixes the same problems inside acpi_os_remove_interrupt_handler and acpi_os_wait_events_complete respectively. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v3: - 1.Rename acpi_inuse_irq to acpi_sci_irq for better understanding

[PATCH] [v4] x86, suspend: Save/restore extra MSR registers for suspend

2015-08-26 Thread Chen Yu
. Tested-by: Marcin Kaszewski marcin.kaszew...@intel.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- v4: - Revert v3 to v2, and fix some typos in changelog/comments. Use msr_info structure instead of msr_id + msr_value. Adjust some codes for better readability. v3: - Simplify the patch

[PATCH 2/3] PM / hibernate: avoid unsafe pages in e820 reserved regions

2015-08-27 Thread Chen Yu
[8.933534] PM: Failed to load hibernation image, recovering. Signed-off-by: Lee, Chun-Yi j...@suse.com Signed-off-by: Chen Yu yu.c.c...@intel.com --- kernel/power/snapshot.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/kernel/power/snapshot.c b

[PATCH 1/3] x86: Kill E820_RESERVED_KERN

2015-08-27 Thread Chen Yu
-by: Lee, Chun-Yi j...@suse.com Tested-by: Lee, Chun-Yi j...@suse.com Reported-by: Tian, Ye yex.t...@intel.com Tested-by: Tian, Ye yex.t...@intel.com Cc: Lee, Chun-Yi j...@suse.com Cc: Chen Yu yu.c.c...@intel.com Signed-off-by: Yinghai Lu ying...@kernel.org Cc: Richard L Maliszewski richard.l.maliszew

[PATCH 3/3] PM / hibernate: Remove the restriction when checking memory size before/after hibernation

2015-08-27 Thread Chen Yu
should be strictly the same before/after hibernation. Note: This patch can only work after: Commit ec93ef809f34 (PM / hibernate: avoid unsafe pages in e820 reserved regions) applied. Signed-off-by: Chen Yu yu.c.c...@intel.com --- kernel/power/snapshot.c | 8 ++-- 1 file changed, 6

[PATCH 0/3] PM / hibernate: Fix hibernation panic caused by inconsistent e820 memory map

2015-08-27 Thread Chen Yu
was once merged but reverted due to regression described in patch 1. patch 3 is to ensure that, system with larger memory size compared to the one before hibernation, will get the permission to resume. Please refer to the changelog in patch 3 for detail. Chen Yu (1): PM / hibernate: Remove

[PATCH] [v2] PM / hibernate: Fix hibernation panic caused by inconsistent e820 map

2015-09-01 Thread Chen Yu
n_mapped, this patch will not guarantee that whether the higmem region is legal for restore. A further work might include a logic to check if each page frame to be restored is in E820_RAM region, but it might require quite neat checkings in the code. For now, just solve the problem reported on x86_64. Si

[PATCH] [v3] PM / hibernate: Fix hibernation panic caused by inconsistent e820 map

2015-09-02 Thread Chen Yu
oading progress: 0% PM: Image loading progress: 10% PM: Image loading progress: 20% PM: Image loading progress: 30% PM: Image loading progress: 40% PM: 0x849dd000 to restored not in valid memory region Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v3: - Adjust the logic to ex

[PATCH] [v2] intel_pstate: Fix user input of min/max to legal policy region

2015-09-09 Thread Chen Yu
pct>=min_perf_pct, suggested by Seiichi Ikarashi. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v2: - Add logic to ensure max_perf_pct>=min_perf_pct. --- drivers/cpufreq/intel_pstate.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/

[PATCH] [v4] PM / hibernate: Fix hibernation panic caused by inconsistent e820 map

2015-09-16 Thread Chen Yu
M: Image loading progress: 0% PM: Image loading progress: 10% PM: Image loading progress: 20% PM: Image loading progress: 30% PM: Image loading progress: 40% PM: Hibernation failed, address 0x849dd000 to restored not valid! Signed-off-by: Chen Yu <yu.c.c...@intel.com> -

[PATCH] [v2] ACPI / PM: Fix incorrect wakeup irq setting before suspend-to-idle

2015-09-26 Thread Chen Yu
marking the acpi_gbl_FADT.sci_interrupt. Meanwhile this patch fixes the same problems inside acpi_os_remove_interrupt_handler and acpi_os_wait_events_complete respectively. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v2: - 1.Define a global acpi_inuse_irq variable, store irq in it and

[PATCH 0/3] Thermal: Fix thermal zone update problems during bootup/suspend

2015-09-26 Thread Chen Yu
forgets to update the device's status in some situations, this may lead to unexpected behavior after system bootup. [PATCH 3/3] Please refer to: https://bugzilla.kernel.org/show_bug.cgi?id=78201 for why these patches are proposed. Chen Yu (3): Thermal: initialize thermal zone device correctly

[PATCH 2/3] Thermal: handle thermal zone device properly during system sleep

2015-09-26 Thread Chen Yu
gt; Tested-by: szegad <szega...@poczta.onet.pl> Tested-by: prash <prash.n@gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Tested-by: Matthias <morpheusxyz...@yahoo.de> Signed-off-by: Zhang Rui <rui.zh...@intel.com> Signed-off-by: Chen Yu <

[PATCH 3/3] Thermal: do thermal zone update after a cooling device registered

2015-09-26 Thread Chen Yu
gmail.com> Tested-by: amish <ammdispose-a...@yahoo.com> Signed-off-by: Zhang Rui <rui.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/thermal/thermal_core.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/thermal/thermal_core.

[PATCH 1/3] Thermal: initialize thermal zone device correctly

2015-09-26 Thread Chen Yu
> Tested-by: amish <ammdispose-a...@yahoo.com> Tested-by: Matthias <morpheusxyz...@yahoo.de> Signed-off-by: Zhang Rui <rui.zh...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/thermal/step_wise.c| 18 -- drivers/thermal/thermal_core.c | 19

[PATCH 1/2] tools/power turbostat: bugfix: TDP MSRs print bits fixing

2015-12-13 Thread Chen Yu
all 15 bits of PKG_TDP_LVL1 (bit 0:14) 0x7FFF And the same modification to MSR_CONFIG_TDP_LEVEL_2. MSR_TURBO_ACTIVATION_RATIO: should print all 8 bits of MAX_NON_TURBO_RATIO (bit 0:7) 0xFF Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- tools/power/x86/turbostat/turbostat.

[PATCH 2/2] tools/power turbostat: bugfix: fix several invalid parameters

2015-12-13 Thread Chen Yu
perf_limit_reasons_probe(family, model) ^ turbostat.c:2259:6: warning: type of ‘model’ defaults to ‘int’ [-Wimplicit-int] Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- tools/power/x86/turbostat/turbostat.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/pow

[PATCH 0/2] tools/power turbostat: Fix TDP MSR bits and invalid parameters

2015-12-13 Thread Chen Yu
[PATCH 1/2] is to fix the TDP MSRs bits calculation, which might bring incorrect information to user. [PATCH 2/2] is to fix invalid parameters passing to dump_cstate_pstate_config_info and also fix some compiling problems. Chen Yu (2): tools/power turbostat: bugfix: TDP MSRs print bits fixing

[PATCH] cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC

2015-12-15 Thread Chen Yu
nk: https://bugzilla.kernel.org/show_bug.cgi?id=69821 Reported-by: Jan Fikar <j.fi...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/cpufreq/cpufreq_governor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_gov

[PATCH] cpufreq: ondemand: Set MIN_FREQUENCY_UP_THRESHOLD to 1

2016-01-03 Thread Chen Yu
nel would keep still the default value that is >= 11. Users now have the advantage that they can make their own decisions and customize the 'trip point' to switch to the max frequency. Link: https://bugzilla.kernel.org/show_bug.cgi?id=65501 Signed-off-by: Chen Yu <yu.c.c...@intel.com>

[PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs

2016-01-01 Thread Chen Yu
use.de> Cc: Paul Gortmaker <paul.gortma...@windriver.com> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Tim Chen <tim.c.c...@linux.intel.com> Cc: Hugh Dickins <hu...@google.com> Cc: Li Zefan <lize...@huawei.com> Cc: Tejun Heo <t...@kernel.org> Cc: cgro...@vger.kernel.o

[PATCH] cpuset: fix cpus_allowed mask for offline/online CPUs

2015-12-27 Thread Chen Yu
side struct cpuset, which will only be updated by writing value to sysfs.cpuset.cpus, and CPU offline/online will use this mask to set the new cpumask for a cpuset. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- kernel/cpuset.c | 24 +++- 1 file changed, 23 insertion

[PATCH][v7] x86, suspend: Save/restore extra MSR registers for suspend

2015-11-24 Thread Chen Yu
not be available or readable in any situation, we use rdmsrl_safe() to safely save these MSRs. Reported-and-tested-by: Marcin Kaszewski <marcin.kaszew...@intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Acked-by: Pavel Machek <pa...@ucw.cz> Signed-off-by: Chen Yu &l

Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation

2016-06-07 Thread Chen Yu
Hi Pavel, On 2016年06月07日 16:03, Pavel Machek wrote: On Mon 2016-06-06 22:19:09, Chen Yu wrote: Stress test from Varun Koyyalagunta reports that, the nonboot CPU would hang occasionally, when resuming from hibernation. Further investigation shows that, the precise phase when nonboot CPU hangs

Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation

2016-06-07 Thread Chen Yu
On 2016年06月07日 17:13, Borislav Petkov wrote: On Tue, Jun 07, 2016 at 04:44:24PM +0800, Chen Yu wrote: I'm doing more test to verify this. I think it would be better if you looked into doing HLT as Brian suggested, instead of touching any memory during s/r. OK, I'll also test this solution

[PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation

2016-06-06 Thread Chen Yu
https://bugzilla.kernel.org/show_bug.cgi?id=106371 Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- arch/x86/kernel/smpboot.c | 16 +++- include/linux/suspend.h | 7 +++ kernel/power/hibernate.c | 3 +++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel

Re: [PATCH][v7] x86, suspend: Save/restore extra MSR registers for suspend

2016-05-24 Thread Chen Yu
Hi Len, On Wed, May 25, 2016 at 12:09 AM, Len Brown <l...@kernel.org> wrote: > +mjg59, who may be seeing this issue on a skylake laptop > > Chen-yu, > > Great debugging, but I think there is a more general fix possible than > this DMI quirk. > > I agree that in t

[PATCH 0/4][RFC v2] x86, hotplug: Use hlt instead of mwait when resuming from hibernation

2016-06-25 Thread Chen Yu
CPUs in a more safe state and just let them watch the boot CPU to do all the things and wakes them up later. The first three patches are preparation for the fourth one, please refer to [4/4] for detail. Chen Yu (4): PM / sleep: Avoid accessing frozen_cpus if it is NULL PM / sleep: Introduce arch

[PATCH 2/4][RFC v2] PM / sleep: Introduce arch-specific hook for disable/enable nonboot cpus

2016-06-25 Thread Chen Yu
, thus to avoid possible unwilling wake up during hibernation resume. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- kernel/cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/kernel/cpu.c b/kernel/cpu.c index d25266e..ce6e5e4 100644 --- a/kernel/cpu.c +++ b/kernel

[PATCH 1/4][RFC v2] PM / sleep: Avoid accessing frozen_cpus if it is NULL

2016-06-25 Thread Chen Yu
frozen_cpus might be NULL if the allocation in previous alloc_frozen_cpus failed, when CONFIG_CPUMASK_OFFSTACK is set. This patch avoid accessing this cpumask if it is NULL. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- kernel/cpu.c | 4 1 file changed, 4 insertions(+) diff

[PATCH][RFC v3] x86, hotplug: Use hlt instead of mwait if invoked from disable_nonboot_cpus

2016-06-28 Thread Chen Yu
disable_nonboot_cpus into arch-specific, so this patch might need small change after that. Comments and suggestions would be appreciated. Link: https://bugzilla.kernel.org/show_bug.cgi?id=106371 Reported-and-tested-by: Varun Koyyalagunta <cpude...@centtech.com> Signed-off-by: Chen Yu <yu.c.c...@

[PATCH][RFC] cpufreq: Avoid warning during resume by return EAGAIN if cpufreq is unavailable

2016-06-25 Thread Chen Yu
Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/cpufreq/cpufreq.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9009295..67a3aa1 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufr

[PATCH 4/4] x86, hotplug: Use hlt instead of mwait when resuming from hibernation

2016-06-25 Thread Chen Yu
, due to: Commit ab76f7b4ab23 ("x86/mm: Set NX on gap between __ex_table and rodata"). Link: https://bugzilla.kernel.org/show_bug.cgi?id=106371 Reported-and-tested-by: Varun Koyyalagunta <cpude...@centtech.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- arch/x86

[PATCH 3/4][RFC v2] PM / hibernate: introduce a flag to indicate resuming from hibernation

2016-06-25 Thread Chen Yu
Sometime we need to do some operations before resuming from hibernation, so introduce a flag to indicate this stage. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- include/linux/suspend.h | 7 +++ kernel/power/hibernate.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/i

[PATCH][v3] ACPI: Do not report _OSI("Darwin") when acpi_osi=!Darwin provided

2016-02-01 Thread Chen Yu
rage the hardware to power off the Thunderbolt, by appending acpi_osi=!Darwin in command line, thus Apple hardware regards it as an incompatible OS X system, hence turns off the Thunderbolt. Link: https://bugzilla.kernel.org/show_bug.cgi?id=92111 Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v3:

[PATCH][v2] ACPI: Do not report _OSI("Darwin") when acpi_osi=!Darwin provided

2016-01-31 Thread Chen Yu
rage the hardware to power off the Thunderbolt, by appending acpi_osi=!Darwin in command line, thus Apple hardware regards it as an incompatible OS X system, hence turns off the Thunderbolt. Link: https://bugzilla.kernel.org/show_bug.cgi?id=92111 Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v2:

[PATCH] ACPI / button: Avoid using broken _LID on Surface tablet

2016-02-03 Thread Chen Yu
state instead of _LID to sysfs. Linked: https://bugzilla.kernel.org/show_bug.cgi?id=89211 Reported-and-tested-by: GiH <g...@maier.one> Reported-by: David J. Goehrig <d...@dloh.org> Reported-by: Stephen Just <stephenj...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.c

[PATCH] ACPI: Do not report _OSI("Darwin") when acpi_osi=!Darwin provided

2016-01-31 Thread Chen Yu
rage the hardware to power off the Thunderbolt, by appending acpi_osi=!Darwin in command line, thus Apple hardware regards it as an incompatible OS X system, hence turns off the Thunderbolt. Link: https://bugzilla.kernel.org/show_bug.cgi?id=92111 Signed-off-by: Chen Yu <yu.c.c...@intel.

[PATCH][RFC,v4] ACPI / PM: Introduce efi poweroff for HW-full platforms without _S5

2016-03-11 Thread Chen Yu
, we only make a minimum enhancement for x86 in native_machine_power_off. Suggested-by: Len Brown <len.br...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v4: - Since in v3 efi_poweroff_required() is not guaranteed to run after all of the other code that may register

[PATCH][v6] ACPI / PM: Introduce efi poweroff for HW-full platforms without _S5

2016-03-21 Thread Chen Yu
there is no path for them to overwrite the pm_power_off to efi power off. Suggested-by: Len Brown <len.br...@intel.com> Reviewed-by: Matt Fleming <m...@codeblueprint.co.uk> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v6: - Some modifications in the commit message. v5: - R

[PATCH][v5] ACPI / PM: Introduce efi poweroff for HW-full platforms without _S5

2016-03-20 Thread Chen Yu
for them to overwrite the pm_power_off to efi power off. Suggested-by: Len Brown <len.br...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v5: - Revert to version 2, enforce EFI poweroff for such kind of platforms. v4: - Since in v3 efi_poweroff_required() is not guara

[PATCH][RFC v3] ACPI / PM: Fix poweroff issue on HW-full platforms without _S5

2016-03-06 Thread Chen Yu
pm_power_off to efi_power_off in efi_shutdown_init, if no other pm_power_off available. Suggested-by: Len Brown <len.br...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v3: - Only assign pm_power_off to efi_power_off when there are no other pm_power_off registered at that t

[PATCH][v2] ACPI / PM: Fix poweroff issue on HW-full platforms without _S5

2016-03-02 Thread Chen Yu
in efi_shutdown_init. Suggested-by: Len Brown <len.br...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v2: - Convert the acpi_no_s5 to a global bool variable in sleep.c and add a declaration to include/linux/acpi.h. --- arch/x86/platform/efi/quirks.c | 2 +- drivers/

[PATCH][RFC v2] cpufreq: governor: Fix overflow when calculating idle time

2016-04-04 Thread Chen Yu
t would be at least 5 years for 64bit to overflow, which would not possibly happen.) Link: https://bugzilla.kernel.org/show_bug.cgi?id=115261 Reported-by: Timo Valtoaho <timo.valto...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v2: - Send this patch to a wider

[PATCH][RFC] cpufreq: governor: Fix overflow when calculating idle time

2016-04-04 Thread Chen Yu
erflow, which would not possibly happen.) Link: https://bugzilla.kernel.org/show_bug.cgi?id=115261 Reported-by: Timo Valtoaho <timo.valto...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- drivers/cpufreq/cpufreq.c | 6 +++--- include/asm-generic/cputime_jiffies.h |

[PATCH v2] cpufreq: intel_pstate: Avoid unnecessary synchronize_sched() during initialization

2016-05-11 Thread Chen Yu
com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v2: - Rewrite the commit log according to Rafael's suggestion. --- drivers/cpufreq/intel_pstate.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index b230eba..98

[PATCH][v3] cpufreq: governor: Fix overflow when calculating idle time

2016-04-18 Thread Chen Yu
an cur_idle_time' from happening. Link: https://bugzilla.kernel.org/show_bug.cgi?id=115261 Reported-by: Timo Valtoaho <timo.valto...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v3: - Do not use INITIAL_JIFFIES because it should be transparent to user, meanwhile keep ori

[PATCH 1/2][RFC v4] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-14 Thread Chen Yu
Image loading progress: 0% [ 274.322127] PM: Image loading progress: 10% ... Comments and suggestions would be appreciated. Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v4: - Fix some errors and

[PATCH 2/2][RFC v4] PM / Documentation: Add description for snapshot test mode

2016-07-14 Thread Chen Yu
Introduce snapshot test mode for hibernation debugging, and update the document accordingly. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- Documentation/power/basic-pm-debugging.txt | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/power

[PATCH 0/2][RFC v4] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-14 Thread Chen Yu
. Chen Yu (2): PM / hibernate: Introduce snapshot test mode for hibernation PM / Documentation: Add description for snapshot test mode Documentation/power/basic-pm-debugging.txt | 15 +++-- kernel/power/hibernate.c | 54 +- kernel/power/main.c

Re: [PATCH 1/2][RFC v3] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-14 Thread Chen Yu
Please ignore this patch, will resend another version later. thanks! On 2016年07月14日 18:45, Chen Yu wrote: This mode is used to verify if the snapshot data written to the swap device can be successfully restored to the memory. It is useful to ease the debugging process on hibernation, since

[PATCH][v6] PM / hibernate: Introduce test_resume mode for hibernation

2016-07-21 Thread Chen Yu
s: 10% [ 188.244781] PM: Image loading progress: 20% [ 189.057305] PM: Image loading done. [ 189.068793] PM: Image successfully loaded Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v6: - If swsusp_write() returns an er

Re: [PATCH][RFC v5] PM / hibernate: Introduce test_resume mode for hibernation

2016-07-21 Thread Chen Yu
On Thu, Jul 21, 2016 at 03:23:32PM +0200, Rafael J. Wysocki wrote: > On Tuesday, July 19, 2016 08:36:44 AM Chen Yu wrote: > > test_resume mode is to verify if the snapshot data > > written to swap device can be successfully restored > > to memory. It is useful to ease

Re: [PATCH][v6] PM / hibernate: Introduce test_resume mode for hibernation

2016-07-29 Thread Chen Yu
On Thu, Jul 28, 2016 at 09:32:06PM +0200, Pavel Machek wrote: > On Fri 2016-07-22 10:30:47, Chen Yu wrote: > > test_resume mode is to verify if the snapshot data > > written to swap device can be successfully restored > > to memory. It is useful to ease the debugging proce

Re: [PATCH][v2] timekeeping: Fix memory overwrite of sleep_time_bin array

2016-07-29 Thread Chen Yu
Hi Thomas, On Tue, Jul 19, 2016 at 12:40:14PM +0200, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Chen Yu wrote: > > On 2016年07月19日 16:36, Thomas Gleixner wrote: > > > On Tue, 19 Jul 2016, Chen Yu wrote: > > > > Further investigation shows that, the problem is

[RFC,v3] timekeeping: Limit the sleep time to avoid overflow

2016-07-30 Thread Chen Yu
.@linaro.org> Cc: Xunlei Pang <xp...@redhat.com> Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux-kernel@vger.kernel.org Cc: linux...@vger.kernel.org Reported-and-tested-by: Janek Kozicki <cosu...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- kernel/time/timekee

[PATCH][RFC] Documentation/: update hibernation debug documentation

2016-08-11 Thread Chen Yu
Update the description of test_resume mode for hibernation. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- Documentation/power/basic-pm-debugging.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/power/basic-pm-debugging.txt b/Documentation/power/ba

[PATCH][RFC v2] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-13 Thread Chen Yu
52] PM: Image loading progress: 0% [ 274.322127] PM: Image loading progress: 10% ... Rebased on top of linux-next. Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- kernel/power/hibernate.c | 10 -- kernel/powe

Re: [PATCH] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-13 Thread Chen Yu
Hi Pavel, thanks for your reply, On 2016年07月13日 17:50, Pavel Machek wrote: On Thu 2016-07-07 14:40:58, Chen Yu wrote: This mode is to verify if the snapshot data written to swap device can be successfully restored to memory. It is useful to ease the debugging process on hibernation, since

Re: [PATCH] x86 / hibernate: Use hlt_play_dead() when resuming from hibernation

2016-07-13 Thread Chen Yu
run Koyyalagunta and investigation carried out by Chen Yu show that the latter sometimes happens in practice. To prevent it from happening, modify native_play_dead() to make it use hlt_play_dead() instead of mwait_play_dead() during resume from hibernation which avoids the inadvertent "rev

[PATCH 0/2][RFC v3] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-14 Thread Chen Yu
. Chen Yu (2): PM / hibernate: Introduce snapshot test mode for hibernation PM / Documentation: Add description for snapshot test mode Documentation/power/basic-pm-debugging.txt | 15 +++-- kernel/power/hibernate.c | 49 +- kernel/power/main.c

[PATCH 2/2][RFC v3] PM / Documentation: Add description for snapshot test mode

2016-07-14 Thread Chen Yu
Introduce snapshot test mode for hibernation debugging, and update the document accordingly. Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- Documentation/power/basic-pm-debugging.txt | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/power

[PATCH 1/2][RFC v3] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-14 Thread Chen Yu
oading progress: 0% [ 274.322127] PM: Image loading progress: 10% ... Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v3: - According to the discussion, there was a potential risk in previous version that might br

Re: [PATCH] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-14 Thread Chen Yu
Hi, On 2016年07月14日 06:18, Rafael J. Wysocki wrote: On Thu, Jul 14, 2016 at 12:00 AM, Rafael J. Wysocki wrote: On Wed, Jul 13, 2016 at 11:45 PM, Pavel Machek wrote: On Wed 2016-07-13 22:44:24, Rafael J. Wysocki wrote: On Wed, Jul 13, 2016 at 10:26 PM, Pavel

[PATCH] timekeeping: Fix memory overwrite of sleep_time_bin array

2016-07-17 Thread Chen Yu
timekeeping core to use timespec64s") Reported-and-tested-by: Janek Kozicki <cosu...@gmail.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- kernel/time/timekeeping_debug.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/time/timekeeping_debug.

[PATCH][RFC v5] PM / hibernate: Introduce test_resume mode for hibernation

2016-07-18 Thread Chen Yu
Image successfully loaded Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Chen Yu <yu.c.c...@intel.com> --- v5: - Introduce a new function to be shared with software_resume(). v4: - Fix some errors and modify the comment for software_resume_unthaw. v3: -

[PATCH][v2] timekeeping: Fix memory overwrite of sleep_time_bin array

2016-07-18 Thread Chen Yu
. To fix this problem, we ignore those abnormal sleep time, since no one would like to sleep that long. Cc: Stable <sta...@vger.kernel.org> # 3.17+ Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Reported-and-tested-by: Janek Kozicki <cosu...@gmail.com> Sig

Re: [PATCH][v2] timekeeping: Fix memory overwrite of sleep_time_bin array

2016-07-19 Thread Chen Yu
Hi Thomas, On 2016年07月19日 16:36, Thomas Gleixner wrote: On Tue, 19 Jul 2016, Chen Yu wrote: It is reported the hibernation fails at 2nd attempt, which hangs at hibernate() -> syscore_resume() -> i8237A_resume() -> claim_dma_lock(), because the lock has already been taken

Re: [PATCH][v2] timekeeping: Fix memory overwrite of sleep_time_bin array

2016-07-20 Thread Chen Yu
Hi Thomas, On Tue, Jul 19, 2016 at 12:40:14PM +0200, Thomas Gleixner wrote: > On Tue, 19 Jul 2016, Chen Yu wrote: > > On 2016年07月19日 16:36, Thomas Gleixner wrote: > > > On Tue, 19 Jul 2016, Chen Yu wrote: > > > > Further investigation shows that, the problem is caused

Re: [PATCH] PM / hibernate: Introduce snapshot test mode for hibernation

2016-07-13 Thread Chen Yu
On 2016年07月13日 18:21, Pavel Machek wrote: Hi! On 2016???07???13??? 17:50, Pavel Machek wrote: On Thu 2016-07-07 14:40:58, Chen Yu wrote: This mode is to verify if the snapshot data written to swap device can be successfully restored to memory. It is useful to ease the debugging process

  1   2   3   4   5   6   7   8   9   10   >