public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Beleswar Prasad Padhi <b-padhi@ti.com>
To: Hari Nagalla <hnagalla@ti.com>, Andrew Davis <afd@ti.com>,
	<jassisinghbrar@gmail.com>, <linux-kernel@vger.kernel.org>
Cc: <hiagofranco@gmail.com>, <u-kumar1@ti.com>
Subject: Re: [RFC PATCH] mailbox: omap-mailbox: Flush out pending msgs before entering suspend
Date: Fri, 24 Oct 2025 10:18:32 +0530	[thread overview]
Message-ID: <abec6709-b9ef-4f33-afbd-eeb69a07b941@ti.com> (raw)
In-Reply-To: <d8662d13-40bd-053b-6761-1a0ff7404782@ti.com>

Hi Hari,

On 23/10/25 22:48, Hari Nagalla wrote:
> On 10/22/25 23:38, Beleswar Prasad Padhi wrote:
>>> I'm still not convinced just throwing out messages is the correct thing
>>> to do here, but for now at very least let's print some warning here when
>>> messages get zapped.
>>
>> I am also considering:
>> 1. Mailbox queues for RTOS-RTOS communication could be
>> firewalled for safety/FFI usecases. In that case, the above flush
>> would result in an exception.
> Yes, flushing all mailbox messages during suspend is not a good solution, as there can be in flight RTOS-RTOS communications for non participating cores.
>> 2. This driver is common to OMAP SoCs which supported proper
>> suspend/resume, meaning those rprocs could consume pending
>> messages in resume. So clearing out messages from Linux
>> might not be the best thing to do here.
>>
>> What else can we do here? Should we just fallback to letting
>> Linux see only it's required queues for IPC? By setting
>> "ti,mbox-num-fifos = <4>"?
> This makes the assumption that the first 4 FIFOs of the mailbox are used? and why 4? are you assuming first 2 for Linux IPC and next 2 for RTOS-RTOS communications?


4 is just an example. The mailbox FIFO assignment is also
a firmware configuration. So the idea was to let Linux only
care about the FIFOs it uses for Linux<->RTOS
communication, ignoring the ones used for
RTOS<->RTOS communication.

>
> How about, let the mailbox driver simply save and restore the config registers and ignore the FIFO messages? i.e if they are lost with the main domain going into OFF, so be it.


Hmm, this was how it was until 2016 when commit
9f0cee984a25 ("mailbox/omap: check for any unread
messages during suspend") was added. Do you
suggest reverting 9f0cee984a25? Hope it doesn't
break any existing usecases for OMAP platforms.


  reply	other threads:[~2025-10-24  4:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 10:20 [RFC PATCH] mailbox: omap-mailbox: Flush out pending msgs before entering suspend Beleswar Padhi
2025-10-22 13:45 ` Hiago De Franco
2025-10-22 16:07 ` Andrew Davis
2025-10-23  4:38   ` Beleswar Prasad Padhi
2025-10-23 17:18     ` Hari Nagalla
2025-10-24  4:48       ` Beleswar Prasad Padhi [this message]
2025-10-24 14:08         ` Andrew Davis
2025-10-30  8:59           ` Francesco Dolcini
2025-10-30  9:12             ` Beleswar Prasad Padhi

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=abec6709-b9ef-4f33-afbd-eeb69a07b941@ti.com \
    --to=b-padhi@ti.com \
    --cc=afd@ti.com \
    --cc=hiagofranco@gmail.com \
    --cc=hnagalla@ti.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u-kumar1@ti.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