linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>, rjw@rjwysocki.net
Cc: lenb@kernel.org, hdegoede@redhat.com, rhowell@uwyo.edu,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / LPSS: Don't skip late system PM ops for hibernate on BYT/CHT
Date: Wed, 3 Apr 2019 11:33:20 +0300	[thread overview]
Message-ID: <6ddb98c7-609c-0276-bea6-590965a3d5a1@linux.intel.com> (raw)
In-Reply-To: <20190403054352.30120-1-kai.heng.feng@canonical.com>

On 4/3/19 8:43 AM, Kai-Heng Feng wrote:
> i2c-designware-platdrv fails to work after the system restored from
> hibernation:
> [ 272.775692] i2c_designware 80860F41:00: Unknown Synopsys component type: 0xffffffff
> 
> Commit 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from
> resume_noirq") makes acpi_lpss_{suspend_late,resume_early}() bail early
> on BYT/CHT as resume_from_noirq is set. This means dw_i2c_plat_resume()
> doesn't gets called by acpi_lpss_resume_early(), and this causes the
> issue.
> 
> Introduce acpi_lpss_{poweroff_late,restore_early}() to make sure
> driver's own poweroff_late and restore_early get called.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202139
> Fixes: 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from resume_noirq")
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>   drivers/acpi/acpi_lpss.c | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
> 
On a BSW/CHT machine I have I see the warnings below at commit 
48402cee6889 after resuming from hibernation but I2C bus itself is 
working so obviously I tested only S3 when I gave the tested by.

This patch is fixing that so here's my tested by to this patch:

Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

But let's wait confirmation from Hans since he has machines and test 
cases where issues from shared I2C bus have shown up.

[  261.472892] ------------[ cut here ]------------
[  261.473361] 808622C1:03 already disabled
[  261.473688] WARNING: CPU: 0 PID: 149 at drivers/clk/clk.c:828 
clk_core_disable+0xca/0x210
[  261.473688] Modules linked in: hid_multitouch hid_generic i2c_hid 
iTCO_wdt atkbd libps2 intel_rapl coretemp aesni_intel aes_x86_64 
crypto_simd glue_helper intel_cstate i915 i2c_i801 intel_gtt 
i2c_algo_bit lpc_ich drm_kms_helper syscopyarea sysfillrect sysimgblt 
fb_sys_fops drm battery tpm_tis i8042 serio i2c_designware_platform 
video i2c_designware_core tpm_tis_core tpm pinctrl_cherryview button 
rng_core ac i2c_dev i2c_core loop
[  261.473688] CPU: 0 PID: 149 Comm: kworker/0:2 Not tainted 4.19.0-rc3+ #8
[  261.473688] Workqueue: pm pm_runtime_work
[  261.473688] RIP: 0010:clk_core_disable+0xca/0x210
[  261.473688] Code: ff ff ff 48 8b 33 48 c7 c7 c3 09 e5 81 e8 98 02 c5 
ff 0f 0b 5b 41 5c 41 5d 5d c3 48 8b 33 48 c7 c7 ae 09 e5 81 e8 80 02 c5 
ff <0f> 0b e9 60 ff ff ff 65 8b 05 f8 84 c0 7e 89 c0 48 0f a3 05 ae 56
[  261.473688] RSP: 0000:ffffc900005ebc58 EFLAGS: 00010082
[  261.473688] RAX: 0000000000000000 RBX: ffff880179d02100 RCX: 
0000000000000006
[  261.473688] RDX: 0000000000000007 RSI: 0000000000000000 RDI: 
ffff88017ba156d0
[  261.473688] RBP: ffffc900005ebc70 R08: 0000000000000000 R09: 
0000000000000001
[  261.473688] R10: 0000000000000004 R11: 0000000000000000 R12: 
ffff880179d02100
[  261.473688] R13: ffff880179d31948 R14: ffffffff813b6030 R15: 
0000000000000008
[  261.473688] FS:  0000000000000000(0000) GS:ffff88017ba00000(0000) 
knlGS:0000000000000000
[  261.473688] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  261.473688] CR2: 00000000570a34bc CR3: 00000001758df000 CR4: 
00000000001006f0
[  261.473688] Call Trace:
[  261.473688]  clk_core_disable_lock+0x1a/0x30
[  261.473688]  clk_disable+0x1a/0x20
[  261.473688]  i2c_dw_prepare_clk+0x25/0x60 [i2c_designware_core]
[  261.473688]  ? i2c_dw_disable+0xd/0x40 [i2c_designware_core]
[  261.473688]  dw_i2c_plat_suspend+0x2e/0x40 [i2c_designware_platform]
[  261.473688]  pm_generic_runtime_suspend+0x2c/0x30
[  261.473688]  acpi_lpss_runtime_suspend+0xd/0x30
[  261.473688]  __rpm_callback+0x75/0x1c0
[  261.473688]  ? acpi_lpss_suspend+0x1b0/0x1b0
[  261.473688]  rpm_callback+0x1f/0x80
[  261.473688]  ? acpi_lpss_suspend+0x1b0/0x1b0
[  261.473688]  rpm_suspend+0x143/0x6b0
[  261.473688]  rpm_idle+0x106/0x3c0
[  261.473688]  pm_runtime_work+0x7b/0xc0
[  261.473688]  process_one_work+0x206/0x5a0
[  261.473688]  worker_thread+0x3f/0x3a0
[  261.473688]  kthread+0x126/0x140
[  261.473688]  ? process_one_work+0x5a0/0x5a0
[  261.473688]  ? kthread_park+0x80/0x80
[  261.473688]  ret_from_fork+0x3a/0x50
[  261.473688] irq event stamp: 1506
[  261.473688] hardirqs last  enabled at (1505): [<ffffffff8170e797>] 
_raw_spin_unlock_irq+0x27/0x40
[  261.473688] hardirqs last disabled at (1506): [<ffffffff81406acd>] 
clk_enable_lock+0xd/0xa0
[  261.473688] softirqs last  enabled at (1310): [<ffffffff81a00285>] 
__do_softirq+0x285/0x464
[  261.473688] softirqs last disabled at (1303): [<ffffffff8105e3dd>] 
irq_exit+0x9d/0xd0
[  261.473688] ---[ end trace b9e91dac2ca18298 ]---
[  261.509646] done.
[  261.513366] PM: hibernation exit
[  261.530737] ------------[ cut here ]------------
[  261.531249] 808622C1:03 already unprepared
[  261.531629] WARNING: CPU: 0 PID: 149 at drivers/clk/clk.c:687 
clk_core_unprepare+0x1aa/0x2e0
[  261.532253] Modules linked in: hid_multitouch hid_generic i2c_hid 
iTCO_wdt atkbd libps2 intel_rapl coretemp aesni_intel aes_x86_64 
crypto_simd glue_helper intel_cstate i915 i2c_i801 intel_gtt 
i2c_algo_bit lpc_ich drm_kms_helper syscopyarea sysfillrect sysimgblt 
fb_sys_fops drm battery tpm_tis i8042 serio i2c_designware_platform 
video i2c_designware_core tpm_tis_core tpm pinctrl_cherryview button 
rng_core ac i2c_dev i2c_core loop
[  261.532253] CPU: 0 PID: 149 Comm: kworker/0:2 Tainted: G        W 
     4.19.0-rc3+ #8
[  261.532253] Workqueue: pm pm_runtime_work
[  261.532253] RIP: 0010:clk_core_unprepare+0x1aa/0x2e0
[  261.532253] Code: 00 00 74 2d 65 ff 0d e5 e7 c0 7e 0f 85 11 ff ff ff 
e8 ea b3 bf ff e9 07 ff ff ff 48 8b 33 48 c7 c7 66 09 e5 81 e8 e0 07 c5 
ff <0f> 0b e9 91 fe ff ff e8 9a 58 cd ff 85 c0 75 ca 48 c7 c2 10 6a de
[  261.532253] RSP: 0018:ffffc900005ebc78 EFLAGS: 00210286
[  261.532253] RAX: 0000000000000000 RBX: ffff880179d02100 RCX: 
0000000000000006
[  261.532253] RDX: 0000000000000007 RSI: ffff880175a188d8 RDI: 
ffff88017ba156d0
[  261.532253] RBP: ffffc900005ebc88 R08: 000000007df0eb62 R09: 
0000000000000000
[  261.532253] R10: 0000000000000000 R11: 0000000000000000 R12: 
0000000000000000
[  261.532253] R13: ffff880179d31948 R14: ffffffff813b6030 R15: 
0000000000000008
[  261.532253] FS:  0000000000000000(0000) GS:ffff88017ba00000(0000) 
knlGS:0000000000000000
[  261.532253] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  261.532253] CR2: 00000000f66ca000 CR3: 0000000177c85000 CR4: 
00000000001006f0
[  261.532253] Call Trace:
[  261.532253]  clk_unprepare+0x23/0x30
[  261.532253]  i2c_dw_prepare_clk+0x2d/0x60 [i2c_designware_core]
[  261.532253]  ? i2c_dw_disable+0xd/0x40 [i2c_designware_core]
[  261.532253]  dw_i2c_plat_suspend+0x2e/0x40 [i2c_designware_platform]
[  261.532253]  pm_generic_runtime_suspend+0x2c/0x30
[  261.532253]  acpi_lpss_runtime_suspend+0xd/0x30
[  261.532253]  __rpm_callback+0x75/0x1c0
[  261.532253]  ? acpi_lpss_suspend+0x1b0/0x1b0
[  261.532253]  rpm_callback+0x1f/0x80
[  261.532253]  ? acpi_lpss_suspend+0x1b0/0x1b0
[  261.532253]  rpm_suspend+0x143/0x6b0
[  261.532253]  rpm_idle+0x106/0x3c0
[  261.532253]  pm_runtime_work+0x7b/0xc0
[  261.532253]  process_one_work+0x206/0x5a0
[  261.532253]  worker_thread+0x3f/0x3a0
[  261.532253]  kthread+0x126/0x140
[  261.532253]  ? process_one_work+0x5a0/0x5a0
[  261.532253]  ? kthread_park+0x80/0x80
[  261.532253]  ret_from_fork+0x3a/0x50
[  261.532253] irq event stamp: 1542
[  261.532253] hardirqs last  enabled at (1541): [<ffffffff810cd4a5>] 
console_unlock+0x3f5/0x5c0
[  261.532253] hardirqs last disabled at (1542): [<ffffffff81001a6e>] 
trace_hardirqs_off_thunk+0x1a/0x1c
[  261.532253] softirqs last  enabled at (1522): [<ffffffff81a00285>] 
__do_softirq+0x285/0x464
[  261.532253] softirqs last disabled at (1509): [<ffffffff8105e3dd>] 
irq_exit+0x9d/0xd0
[  261.532253] ---[ end trace b9e91dac2ca18299 ]---

  reply	other threads:[~2019-04-03  8:33 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  5:43 [PATCH] ACPI / LPSS: Don't skip late system PM ops for hibernate on BYT/CHT Kai-Heng Feng
2019-04-03  8:33 ` Jarkko Nikula [this message]
2019-04-03  8:54 ` Hans de Goede
2019-04-07 20:58   ` Robert R. Howell
2019-04-07 20:58     ` Robert R. Howell
2019-04-08  3:44     ` Kai Heng Feng
2019-04-08  3:44       ` Kai Heng Feng
2019-04-11 19:50       ` Robert R. Howell
2019-04-11 19:50         ` Robert R. Howell
2019-04-08  8:16     ` Hans de Goede
2019-04-08  8:16       ` Hans de Goede
2019-04-11 19:50       ` Robert R. Howell
2019-04-11 19:50         ` Robert R. Howell
2019-04-18 11:42         ` Hans de Goede
2019-04-18 11:42           ` Hans de Goede
2019-04-19 22:44           ` Robert R. Howell
2019-04-19 22:44             ` Robert R. Howell
2019-04-23  8:07             ` Rafael J. Wysocki
2019-04-23  8:07               ` Rafael J. Wysocki
2019-04-23 20:03               ` Robert R. Howell
2019-04-23 20:03                 ` Robert R. Howell
2019-04-24  7:20                 ` Rafael J. Wysocki
2019-04-24  7:20                   ` Rafael J. Wysocki
2019-04-25 16:38                   ` Robert R. Howell
2019-04-25 16:38                     ` Robert R. Howell
2019-04-30 14:39                     ` Hans de Goede
2019-04-30 14:39                       ` Hans de Goede
2019-05-09  4:24                       ` Robert R. Howell
2019-05-09  8:50                         ` Hans de Goede
2019-05-09 18:09                           ` Robert R. Howell
2019-05-13  8:41                             ` Hans de Goede
2019-05-16 16:34                               ` Robert R. Howell
2019-05-14 10:10                             ` Hans de Goede
2019-05-16 11:11                     ` Rafael J. Wysocki
2019-05-16 16:35                       ` Robert R. Howell
2019-05-16 22:42                         ` Rafael J. Wysocki
2019-05-25  5:31                       ` Robert R. Howell
2019-06-24 10:24                         ` Rafael J. Wysocki
2019-06-24 10:51                           ` Hans de Goede
2019-06-24 23:14                             ` Rafael J. Wysocki
2019-06-26 18:43                           ` Robert R. Howell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ddb98c7-609c-0276-bea6-590965a3d5a1@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rhowell@uwyo.edu \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).