linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: Put the IVRS table in AMD ACS quirk handler
@ 2020-07-22  9:44 Hanjun Guo
  2020-07-29 23:02 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Hanjun Guo @ 2020-07-22  9:44 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Hanjun Guo

The acpi_get_table() should be coupled with acpi_put_table() if
the mapped table is not used at runtime to release the table
mapping.

In pci_quirk_amd_sb_acs(), IVRS table is just used for checking
AMD IOMMU is supported, not used at runtime, put the table after
using it.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 812bfc3..487ed4d 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4409,6 +4409,8 @@ static int pci_quirk_amd_sb_acs(struct pci_dev *dev, u16 acs_flags)
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
 
+	acpi_put_table(header);
+
 	/* Filter out flags not applicable to multifunction */
 	acs_flags &= (PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_EC | PCI_ACS_DT);
 
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-30 16:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22  9:44 [PATCH] PCI: Put the IVRS table in AMD ACS quirk handler Hanjun Guo
2020-07-29 23:02 ` Bjorn Helgaas
2020-07-30  6:14   ` Hanjun Guo
2020-07-30 16:30     ` Don Dutile

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).