From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
vkoul@kernel.org
Cc: alsa-devel@alsa-project.org, amadeuszx.slawinski@linux.intel.com,
Mario.Limonciello@amd.com, Sunil-kumar.Dommati@amd.com,
Basavaraj.Hiregoudar@amd.com, Mastan.Katragadda@amd.com,
Arungopal.kondaveeti@amd.com,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Sanyog Kale <sanyog.r.kale@intel.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V3 5/8] soundwire: amd: add SoundWire manager interrupt handling
Date: Wed, 22 Feb 2023 14:32:18 +0530 [thread overview]
Message-ID: <078dd369-1365-24fd-5b13-92e2b71fca85@amd.com> (raw)
In-Reply-To: <bc6aa297-0276-9e84-c775-7fe735ddaafa@linux.intel.com>
On 21/02/23 21:35, Pierre-Louis Bossart wrote:
>> +static void amd_sdw_read_and_process_ping_status(struct amd_sdw_manager *amd_manager)
>> +{
>> + u64 response;
>> +
>> + mutex_lock(&amd_manager->bus.msg_lock);
>> + response = amd_sdw_send_cmd_get_resp(amd_manager, 0, 0);
>> + mutex_unlock(&amd_manager->bus.msg_lock);
>> + amd_sdw_process_ping_status(response, amd_manager);
> do you have a case where a new command could be sent after the
> mutex_unlock(), which could change the response fields?
No. There won't be a new command which will change response fields.
We are using lock to prevent peripheral registers read/writes during
sending ping command.
This implementation is used to send ping command and read and process
peripheral status when PREQ is asserted and this function is also invoked
after peripheral enumeration sequence is completed to collect updated
peripheral status.
> In other words, should the last amd_sdw_process_ping_status() function
> be protected as well?
IMO, it's not needed.
>> +}
next prev parent reply other threads:[~2023-02-22 9:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 10:04 [PATCH V3 0/8] Add SoundWire support for AMD platforms Vijendar Mukunda
2023-02-20 10:04 ` [PATCH V3 1/8] soundwire: export sdw_compute_slave_ports() function Vijendar Mukunda
2023-02-20 10:04 ` [PATCH V3 2/8] soundwire: amd: Add support for AMD Manager driver Vijendar Mukunda
2023-02-21 15:57 ` Pierre-Louis Bossart
2023-02-22 7:18 ` Mukunda,Vijendar
2023-02-22 9:31 ` Claudiu.Beznea
2023-02-20 10:04 ` [PATCH V3 3/8] soundwire: amd: register SoundWire manager dai ops Vijendar Mukunda
2023-02-21 15:59 ` Pierre-Louis Bossart
2023-02-21 21:05 ` Mukunda,Vijendar
2023-02-21 23:48 ` Pierre-Louis Bossart
2023-02-22 5:39 ` Mukunda,Vijendar
2023-02-20 10:04 ` [PATCH V3 4/8] soundwire: amd: enable build for AMD SoundWire manager driver Vijendar Mukunda
2023-02-21 16:01 ` Pierre-Louis Bossart
2023-02-20 10:04 ` [PATCH V3 5/8] soundwire: amd: add SoundWire manager interrupt handling Vijendar Mukunda
2023-02-21 16:05 ` Pierre-Louis Bossart
2023-02-22 9:02 ` Mukunda,Vijendar [this message]
2023-02-20 10:04 ` [PATCH V3 6/8] soundwire: amd: add runtime pm ops for AMD SoundWire manager driver Vijendar Mukunda
2023-02-21 16:10 ` Pierre-Louis Bossart
2023-02-21 20:50 ` Mukunda,Vijendar
2023-02-20 10:04 ` [PATCH V3 7/8] soundwire: amd: handle SoundWire wake enable interrupt Vijendar Mukunda
2023-02-21 16:13 ` Pierre-Louis Bossart
2023-02-21 20:40 ` Mukunda,Vijendar
2023-02-20 10:04 ` [PATCH V3 8/8] soundwire: amd: add pm_prepare callback and pm ops support Vijendar Mukunda
2023-02-21 16:24 ` Pierre-Louis Bossart
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=078dd369-1365-24fd-5b13-92e2b71fca85@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Arungopal.kondaveeti@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Mastan.Katragadda@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/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