From: "Jan Dąbroś" <jsd@semihalf.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-i2c <linux-i2c@vger.kernel.org>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
Wolfram Sang <wsa@kernel.org>,
Raul E Rangel <rrangel@chromium.org>,
Marcin Wojtas <mw@semihalf.com>,
Grzegorz Jaszczyk <jaz@semihalf.com>,
upstream@semihalf.com, Tom Lendacky <thomas.lendacky@amd.com>,
"Deucher, Alexander" <alexander.deucher@amd.com>,
"Easow, Nimesh" <Nimesh.Easow@amd.com>,
"Limonciello, Mario" <mario.limonciello@amd.com>
Subject: Re: [PATCH v3 2/2] i2c: designware: Add AMD PSP I2C bus support
Date: Tue, 8 Feb 2022 15:15:24 +0100 [thread overview]
Message-ID: <CAOtMz3P18emF_1tPvXzckVS8V4DWYB6Evqu+V6PsXN6L2YH2aA@mail.gmail.com> (raw)
In-Reply-To: <YgEFWN8K7Yh452GY@smile.fi.intel.com>
pon., 7 lut 2022 o 12:42 Andy Shevchenko
<andriy.shevchenko@linux.intel.com> napisał(a):
>
> On Mon, Feb 07, 2022 at 09:27:12AM +0100, Jan Dąbroś wrote:
> > śr., 2 lut 2022 o 17:16 Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> napisał(a):
> > > On Wed, Feb 02, 2022 at 03:43:02PM +0100, Jan Dabros wrote:
>
> ...
>
> > > > +struct psp_i2c_req {
> > > > + struct psp_req_buffer_hdr hdr;
> > > > + enum psp_i2c_req_type type;
> > > > +} __aligned(32);
> > >
> > > I forgot if this alignment is requirement due to DMA or so?
> > > We may use ____cacheline_aligned in such case.
> >
> > I used some old code as a reference - this structure is mapped by PSP,
> > thus alignment applied here. I'm checking this with AMD whether it is
> > really needed or at least can be somehow limited - still waiting for
> > their response.
> > I propose to left this as is right now and eventually remove or make
> > more liberal in the future.
>
> Would be nice to clarify sooner than later.
> In either case it needs a good comment.
I confirmed that we can remove this alignment completely. Removed in v4.
Best Regards,
Jan
>
> ...
>
> > > > + return readl_poll_timeout(&mbox->cmd_fields, tmp, (tmp == expected),
> > > > + 0, 1000 * PSP_CMD_TIMEOUT_MS);
> > >
> > > 0?!
> >
> > Yes, we are checking for readiness of PSP mailbox in a tight loop. We
> > would like to proceed further quickly as soon as this bit is set.
> > Actually checking this twice per every ACQUIRE&RELEASE - once before
> > sending command (to check whether PSP is ready to accept requests) and
> > second time after sending it. Do you think we should increase
> > @sleep_us value?
>
> It depends on what you have in mind about hardware. I'm fine with either way,
> but 0 has to be explained (in the comment).
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
next prev parent reply other threads:[~2022-02-08 14:15 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 0:16 [PATCH 0/2] i2c-designware: Add support for AMD PSP semaphore Jan Dabros
2022-01-20 0:16 ` [PATCH 1/2] i2c: designware: Add missing locks Jan Dabros
2022-01-20 11:25 ` Hans de Goede
2022-01-24 10:33 ` Jan Dąbroś
2022-01-28 14:48 ` [PATCH v2 0/2] i2c-designware: Add support for AMD PSP semaphore Jan Dabros
2022-01-28 14:48 ` [PATCH v2 1/2] i2c: designware: Add missing locks Jan Dabros
2022-01-28 14:48 ` [PATCH v2 2/2] i2c: designware: Add AMD PSP I2C bus support Jan Dabros
2022-01-28 14:59 ` Jan Dąbroś
2022-01-28 15:49 ` Andy Shevchenko
2022-01-31 12:10 ` Jan Dąbroś
[not found] ` <CAOtMz3Oryr7mmRKf+secix_6=ZD_Lq+pMUoP=5T6AS6BPoqyQw@mail.gmail.com>
2022-01-31 13:31 ` Andy Shevchenko
2022-02-02 14:42 ` Jan Dąbroś
2022-01-28 14:58 ` [PATCH v2 0/2] i2c-designware: Add support for AMD PSP semaphore Jan Dąbroś
2022-02-02 14:43 ` [PATCH v3 " Jan Dabros
2022-02-02 14:43 ` [PATCH v3 2/2] i2c: designware: Add AMD PSP I2C bus support Jan Dabros
2022-02-02 16:13 ` Andy Shevchenko
2022-02-07 8:27 ` Jan Dąbroś
2022-02-07 11:41 ` Andy Shevchenko
2022-02-08 14:15 ` Jan Dąbroś [this message]
2022-02-07 14:25 ` Wolfram Sang
2022-02-08 14:13 ` Jan Dąbroś
2022-02-02 22:49 ` Limonciello, Mario
2022-02-03 10:41 ` Andy Shevchenko
2022-02-03 11:52 ` Jan Dąbroś
2022-01-20 0:16 ` [PATCH " Jan Dabros
2022-01-20 11:44 ` kernel test robot
2022-01-20 11:51 ` Hans de Goede
2022-01-21 9:59 ` Jan Dąbroś
2022-01-21 10:32 ` Hans de Goede
2022-01-21 17:38 ` Limonciello, Mario
2022-01-21 19:18 ` Tom Lendacky
2022-01-24 13:42 ` Jan Dąbroś
2022-01-26 19:36 ` Limonciello, Mario
2022-01-28 14:47 ` Jan Dąbroś
2022-01-24 12:35 ` Jan Dąbroś
2022-01-24 14:27 ` Hans de Goede
2022-01-20 14:20 ` Andy Shevchenko
2022-01-21 10:20 ` Jan Dąbroś
2022-01-21 17:51 ` Andy Shevchenko
2022-01-28 14:46 ` Jan Dąbroś
2022-01-20 15:33 ` kernel test robot
2022-01-20 17:09 ` Andy Shevchenko
2022-01-28 14:39 ` Jan Dąbroś
2022-01-20 11:15 ` [PATCH 0/2] i2c-designware: Add support for AMD PSP semaphore Hans de Goede
2022-01-20 12:29 ` Jan Dąbroś
2022-01-20 15:57 ` Hans de Goede
2022-01-21 10:27 ` Jan Dąbroś
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=CAOtMz3P18emF_1tPvXzckVS8V4DWYB6Evqu+V6PsXN6L2YH2aA@mail.gmail.com \
--to=jsd@semihalf.com \
--cc=Nimesh.Easow@amd.com \
--cc=alexander.deucher@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jaz@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mw@semihalf.com \
--cc=rrangel@chromium.org \
--cc=thomas.lendacky@amd.com \
--cc=upstream@semihalf.com \
--cc=wsa@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).