Thread (40 messages) 40 messages, 8 authors, 2025-08-29
STALE306d

[PATCH v2 09/10] PCI: aspeed: Add ASPEED PCIe RC driver

From: Jacky Chou <jacky_chou@aspeedtech.com>
Date: 2025-08-27 03:45:12
Also in: linux-arm-kernel, linux-aspeed, linux-gpio, linux-pci, lkml, openbmc

Hi Markus,

Thank you for your reply.
quoted
+++ b/drivers/pci/controller/pcie-aspeed.c
@@ -0,0 +1,1137 @@
quoted
+static int aspeed_irq_msi_domain_alloc(struct irq_domain *domain,
+				       unsigned int virq, unsigned int nr_irqs,
+				       void *args)
+{
quoted
+	mutex_lock(&pcie->lock);
+
+	bit = bitmap_find_free_region(pcie->msi_irq_in_use,
MAX_MSI_HOST_IRQS,
quoted
+				      get_count_order(nr_irqs));
+
+	mutex_unlock(&pcie->lock);
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&pcie->lock);”?
https://elixir.bootlin.com/linux/v6.16-rc6/source/include/linux/mutex.h#L225
Thanks for the information that made me know this method.
I just referred to the existed drivers in Linux before, and it seems there are a lot of drivers keeping the original usage.
So, I have no idea Linux have introduced these methods.
I will take care of these usages in my develop and will change it in this driver in next version.

Thanks,
Jacky
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help