From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] x86: baytrail/cherrytrail: Rework and move P-Unit PMIC bus semaphore code
Date: Fri, 12 Oct 2018 18:08:21 +0100 [thread overview]
Message-ID: <20181012180821.602abd04@alans-desktop> (raw)
In-Reply-To: <34244947-6b73-55c2-a0e8-b6a66050a612@redhat.com>
> > It should be.
>
> You mean that the problem should be purely academic, IOW that registers touched
> by the P-Unit are never touched through ACPI Opregions / power-resources?
As far as I am aware. Holding the lock over both is definitely better
regardless
> >> 2) To safely access the shared I2C bus, we need to do 3 things:
> >> a) Notify the GPU driver that we are starting a window in which it may not
> >> access the P-Unit, since the P-Unit seems to ignore the semaphore for
> >> explicit power-level requests made by the GPU driver
> >
> > That's not what happens. It's more a problem of
> >
> > We take the SEM
> > The GPU driver pokes the GPU
> > The GPU decides it wants to change the power situation
> > The GPU asks
> > It blocks on the SEM
> >
> > and the system deadlocks.
>
> That may be, but why does it deadlock?
As I understand it because the CPU is stuck waiting for the GPU which is
waiting for the SEM which the CPU is holding. This isn't purely software
remember.
> I can understand that you are reluctant to change this code, but this
> commit is not changing the logic, it mostly just moves the code around
> and I do believe that overall doing this is worthwhile.
Fair enough
Alan
next prev parent reply other threads:[~2018-10-12 17:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 14:29 [PATCH v3 0/3] x86: baytrail/cherrytrail: Rework and move P-Unit PMIC semaphore handling Hans de Goede
2018-10-11 14:29 ` [PATCH v3 1/3] x86: baytrail/cherrytrail: Rework and move P-Unit PMIC bus semaphore code Hans de Goede
2018-10-11 20:35 ` Alan Cox
2018-10-12 9:23 ` Hans de Goede
2018-10-12 17:08 ` Alan Cox [this message]
2018-10-14 13:17 ` Wolfram Sang
2018-10-15 14:15 ` Jarkko Nikula
2018-10-17 10:34 ` Wolfram Sang
2018-10-11 14:29 ` [PATCH v3 2/3] ACPI / PMIC: xpower: Block P-Unit I2C access during read-modify-write Hans de Goede
2018-10-11 14:29 ` [PATCH v3 3/3] i2c: designware: Cleanup bus lock handling Hans de Goede
2018-10-15 14:15 ` Jarkko Nikula
2018-10-18 8:03 ` Wolfram Sang
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=20181012180821.602abd04@alans-desktop \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=hpa@zytor.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=wsa@the-dreams.de \
--cc=x86@kernel.org \
/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).