<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/drivers/mailbox, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/drivers/mailbox?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/drivers/mailbox?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2025-10-19T14:37:12Z</updated>
<entry>
<title>mailbox: mtk-cmdq: Remove pm_runtime APIs from cmdq_mbox_send_data()</title>
<updated>2025-10-19T14:37:12Z</updated>
<author>
<name>Jason-JH Lin</name>
<email>jason-jh.lin@mediatek.com</email>
</author>
<published>2025-08-29T09:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=37ce5a4207616536a7e09e20f2a9ff7a5527a49f'/>
<id>urn:sha1:37ce5a4207616536a7e09e20f2a9ff7a5527a49f</id>
<content type='text'>
[ Upstream commit 3f39f56520374cf56872644acf9afcc618a4b674 ]

pm_runtime_get_sync() and pm_runtime_put_autosuspend() were previously
called in cmdq_mbox_send_data(), which is under a spinlock in msg_submit()
(mailbox.c). This caused lockdep warnings such as "sleeping function
called from invalid context" when running with lockdebug enabled.

The BUG report:
  BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1164
  in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 3616, name: kworker/u17:3
    preempt_count: 1, expected: 0
    RCU nest depth: 0, expected: 0
    INFO: lockdep is turned off.
    irq event stamp: 0
    CPU: 1 PID: 3616 Comm: kworker/u17:3 Not tainted 6.1.87-lockdep-14133-g26e933aca785 #1
    Hardware name: Google Ciri sku0/unprovisioned board (DT)
    Workqueue: imgsys_runner imgsys_runner_func
    Call trace:
     dump_backtrace+0x100/0x120
     show_stack+0x20/0x2c
     dump_stack_lvl+0x84/0xb4
     dump_stack+0x18/0x48
     __might_resched+0x354/0x4c0
     __might_sleep+0x98/0xe4
     __pm_runtime_resume+0x70/0x124
     cmdq_mbox_send_data+0xe4/0xb1c
     msg_submit+0x194/0x2dc
     mbox_send_message+0x190/0x330
     imgsys_cmdq_sendtask+0x1618/0x2224
     imgsys_runner_func+0xac/0x11c
     process_one_work+0x638/0xf84
     worker_thread+0x808/0xcd0
     kthread+0x24c/0x324
     ret_from_fork+0x10/0x20

Additionally, pm_runtime_put_autosuspend() should be invoked from the
GCE IRQ handler to ensure the hardware has actually completed its work.

To resolve these issues, remove the pm_runtime calls from
cmdq_mbox_send_data() and delegate power management responsibilities
to the client driver.

Fixes: 8afe816b0c99 ("mailbox: mtk-cmdq-mailbox: Implement Runtime PM with autosuspend")
Signed-off-by: Jason-JH Lin &lt;jason-jh.lin@mediatek.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mailbox: zynqmp-ipi: Fix SGI cleanup on unbind</title>
<updated>2025-10-19T14:37:11Z</updated>
<author>
<name>Harini T</name>
<email>harini.t@amd.com</email>
</author>
<published>2025-09-29T07:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=32bf7c6e01f5ba17a53ba236a770bd0274cefdf4'/>
<id>urn:sha1:32bf7c6e01f5ba17a53ba236a770bd0274cefdf4</id>
<content type='text'>
[ Upstream commit bb160e791ab15b89188a7a19589b8e11f681bef3 ]

The driver incorrectly determines SGI vs SPI interrupts by checking IRQ
number &lt; 16, which fails with dynamic IRQ allocation. During unbind,
this causes improper SGI cleanup leading to kernel crash.

Add explicit irq_type field to pdata for reliable identification of SGI
interrupts (type-2) and only clean up SGI resources when appropriate.

Fixes: 6ffb1635341b ("mailbox: zynqmp: handle SGI for shared IPI")
Signed-off-by: Harini T &lt;harini.t@amd.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mailbox: zynqmp-ipi: Fix out-of-bounds access in mailbox cleanup loop</title>
<updated>2025-10-19T14:37:11Z</updated>
<author>
<name>Harini T</name>
<email>harini.t@amd.com</email>
</author>
<published>2025-09-29T07:37:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=ab96f08ecedd263ecaab9df8455bfb23b07fdcc2'/>
<id>urn:sha1:ab96f08ecedd263ecaab9df8455bfb23b07fdcc2</id>
<content type='text'>
[ Upstream commit 0aead8197fc1a85b0a89646e418feb49a564b029 ]

The cleanup loop was starting at the wrong array index, causing
out-of-bounds access.
Start the loop at the correct index for zero-indexed arrays to prevent
accessing memory beyond the allocated array bounds.

Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller")
Signed-off-by: Harini T &lt;harini.t@amd.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mailbox: zynqmp-ipi: Remove dev.parent check in zynqmp_ipi_free_mboxes</title>
<updated>2025-10-19T14:37:11Z</updated>
<author>
<name>Harini T</name>
<email>harini.t@amd.com</email>
</author>
<published>2025-09-29T07:37:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=66ca91400d7718803aeb9a18b57ff6632e103b77'/>
<id>urn:sha1:66ca91400d7718803aeb9a18b57ff6632e103b77</id>
<content type='text'>
[ Upstream commit 019e3f4550fc7d319a7fd03eff487255f8e8aecd ]

The ipi_mbox-&gt;dev.parent check is unreliable proxy for registration
status as it fails to protect against probe failures that occur after
the parent is assigned but before device_register() completes.

device_is_registered() is the canonical and robust method to verify the
registration status.

Remove ipi_mbox-&gt;dev.parent check in zynqmp_ipi_free_mboxes().

Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller")
Signed-off-by: Harini T &lt;harini.t@amd.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister() call</title>
<updated>2025-10-19T14:37:11Z</updated>
<author>
<name>Harini T</name>
<email>harini.t@amd.com</email>
</author>
<published>2025-09-29T07:37:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=87b0740b35cfff5a5ff5c4c6d6df373182127fcc'/>
<id>urn:sha1:87b0740b35cfff5a5ff5c4c6d6df373182127fcc</id>
<content type='text'>
[ Upstream commit 341867f730d3d3bb54491ee64e8b1a0c446656e7 ]

The controller is registered using the device-managed function
'devm_mbox_controller_register()'. As documented in mailbox.c, this
ensures the devres framework automatically calls
mbox_controller_unregister() when device_unregister() is invoked, making
the explicit call unnecessary.

Remove redundant mbox_controller_unregister() call as
device_unregister() handles controller cleanup.

Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller")
Signed-off-by: Harini T &lt;harini.t@amd.com&gt;
Reviewed-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mailbox/pcc: support mailbox management of the shared buffer</title>
<updated>2025-08-08T04:49:56Z</updated>
<author>
<name>Adam Young</name>
<email>admiyo@os.amperecomputing.com</email>
</author>
<published>2025-07-15T00:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=5378bdf6a611a32500fccf13d14156f219bb0c85'/>
<id>urn:sha1:5378bdf6a611a32500fccf13d14156f219bb0c85</id>
<content type='text'>
Define a new, optional, callback that allows the driver to
specify how the return data buffer is allocated.  If that callback
is set,  mailbox/pcc.c is now responsible for reading from and
writing to the PCC shared buffer.

This also allows for proper checks of the Commnand complete flag
between the PCC sender and receiver.

For Type 4 channels, initialize the command complete flag prior
to accepting messages.

Since the mailbox does not know what memory allocation scheme
to use for response messages, the client now has an optional
callback that allows it to allocate the buffer for a response
message.

When an outbound message is written to the buffer, the mailbox
checks for the flag indicating the client wants an tx complete
notification via IRQ.  Upon receipt of the interrupt It will
pair it with the outgoing message. The expected use is to
free the kernel memory buffer for the previous outgoing message.

Signed-off-by: Adam Young &lt;admiyo@os.amperecomputing.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
</content>
</entry>
<entry>
<title>mailbox: bcm74110: Fix spelling mistake</title>
<updated>2025-08-06T17:45:05Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2025-07-23T09:53:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=75f1fbc9fd409a0c232dc78871ee7df186da9d57'/>
<id>urn:sha1:75f1fbc9fd409a0c232dc78871ee7df186da9d57</id>
<content type='text'>
There is a spelling mistake in the author's email address. Fix it.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Reviewed-by: Justin Chen &lt;justin.chen@broadcom.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
</content>
</entry>
<entry>
<title>mailbox: bcm74110: remove unneeded semicolon</title>
<updated>2025-08-06T17:45:05Z</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2025-07-25T07:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=7fbb5a5672cce49dc0e1d54fd15621eec9d48448'/>
<id>urn:sha1:7fbb5a5672cce49dc0e1d54fd15621eec9d48448</id>
<content type='text'>
No functional modification involved.

./drivers/mailbox/bcm74110-mailbox.c:483:2-3: Unneeded semicolon.
./drivers/mailbox/bcm74110-mailbox.c:563:2-3: Unneeded semicolon.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22936
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
</content>
</entry>
<entry>
<title>mailbox: aspeed: add mailbox driver for AST27XX series SoC</title>
<updated>2025-08-06T17:45:05Z</updated>
<author>
<name>Jammy Huang</name>
<email>jammy_huang@aspeedtech.com</email>
</author>
<published>2025-07-22T01:31:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=ae524eb766460a9f7957bf2db0968c9cccb71d90'/>
<id>urn:sha1:ae524eb766460a9f7957bf2db0968c9cccb71d90</id>
<content type='text'>
Add mailbox controller driver for AST27XX SoCs, which provides
independent tx/rx mailbox between different processors. There are 4
channels for each tx/rx mailbox and each channel has an 32-byte FIFO.

Signed-off-by: Jammy Huang &lt;jammy_huang@aspeedtech.com&gt;
Reviewed-by: Andrew Jeffery &lt;andrew@codeconstruct.com.au&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
</content>
</entry>
<entry>
<title>mailbox: Add support for bcm74110</title>
<updated>2025-08-06T17:43:55Z</updated>
<author>
<name>Justin Chen</name>
<email>justin.chen@broadcom.com</email>
</author>
<published>2025-06-02T22:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=52436007b862a90348ac8efc3a89eaceb2234f53'/>
<id>urn:sha1:52436007b862a90348ac8efc3a89eaceb2234f53</id>
<content type='text'>
The bcm74110 mailbox driver is used to communicate with
a co-processor for various power management and firmware
related tasks.

Signed-off-by: Justin Chen &lt;justin.chen@broadcom.com&gt;
Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Tested-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
</content>
</entry>
</feed>
