From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>, Len Brown <lenb@kernel.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Takashi Iwai <tiwai@suse.de>,
"russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
Vincent Gerris <vgerris@gmail.com>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2 4/5] i2c: designware-baytrail: Force the CPU to C1 state while holding the punit semaphore
Date: Sat, 10 Dec 2016 16:53:15 +0200 [thread overview]
Message-ID: <1481381595.7188.6.camel@linux.intel.com> (raw)
In-Reply-To: <20161210141908.16470-4-hdegoede@redhat.com>
+Cc: Len
Len, I think you would be interested by this.
Hans, thanks for the change! Most probably we will anticipate Len's ACK
on this one.
On Sat, 2016-12-10 at 15:19 +0100, Hans de Goede wrote:
> On my cherrytrail tablet with axp288 pmic, just doing a bunch of
> repeated
> reads from the pmic, e.g. "i2cdump -y 14 0x34" would lookup the tablet
> in
> 1 - 3 runs guaranteed.
>
> This seems to be causes by the cpuidle / intel_idle driver trying to
> change the C-state while we hold the punit bus semaphore, at which
> point
> everything just hangs.
>
> Avoid this by forcing the CPU to C1 before acquiring the punit bus
> semaphore.
Isn't it C0? C1 as far as I remember is halted state.
> @@ -33,6 +34,13 @@ static int get_sem(struct dw_i2c_dev *dev, u32
> *sem)
> u32 data;
> int ret;
>
> + /*
> + * Force CPU to C1 state, otherwise if the cpuidle /
> intel_idle
> + * driver tries to change the C state while we're holding the
> + * semaphore, the SoC hangs.
C0?
> + */
> + pm_qos_update_request(&dev->pm_qos, 0);
C1 is when you set 1 here, right?
> platform_device *pdev)
> if (!dev->pm_runtime_disabled)
> pm_runtime_disable(&pdev->dev);
> + if (dev->acquire_lock)
> + pm_qos_remove_request(&dev->pm_qos);
> +
Perhaps you need to do this in -core.c. Otherwise you missed PCI case.
(Even with PCI enumerated host with ACPI-enabled firmware you may get
_SEM object present)
> return 0;
> }
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-12-10 14:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 14:19 [PATCH v2 1/5] i2c: designware: Rename accessor_flags to flags Hans de Goede
2016-12-10 14:19 ` [PATCH v2 2/5] i2c: designware-baytrail: Pass dw_i2c_dev into helper functions Hans de Goede
2016-12-10 14:19 ` [PATCH v2 3/5] i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts Hans de Goede
2016-12-10 14:54 ` Andy Shevchenko
2016-12-10 19:26 ` Hans de Goede
2016-12-10 14:19 ` [PATCH v2 4/5] i2c: designware-baytrail: Force the CPU to C1 state while holding the punit semaphore Hans de Goede
2016-12-10 14:53 ` Andy Shevchenko [this message]
2016-12-10 19:33 ` Hans de Goede
2016-12-10 19:59 ` Hans de Goede
2016-12-25 18:31 ` Len Brown
2016-12-26 11:07 ` Hans de Goede
2016-12-31 21:29 ` Hans de Goede
2017-01-02 8:26 ` Andy Shevchenko
2016-12-10 14:19 ` [PATCH v2 5/5] i2c: designware-baytrail: Add support for cherrytrail Hans de Goede
2016-12-10 15:01 ` Andy Shevchenko
2016-12-10 14:36 ` [PATCH v2 1/5] i2c: designware: Rename accessor_flags to flags Andy Shevchenko
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=1481381595.7188.6.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=russianneuromancer@ya.ru \
--cc=tiwai@suse.de \
--cc=vgerris@gmail.com \
--cc=wsa@the-dreams.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.