Thread (18 messages) 18 messages, 8 authors, 2016-07-20

[RFC PATCH 1/3] pci, acpi: Match PCI config space accessors against platfrom specific ECAM quirks.

From: David Daney <hidden>
Date: 2016-06-03 16:57:49
Also in: linux-acpi, linux-pci, lkml

On 06/03/2016 08:32 AM, Gabriele Paoloni wrote:
[...]
quoted
quoted
+struct pci_ecam_ops *pci_mcfg_get_ops(struct acpi_pci_root *root)
+{
+	int bus_num = root->secondary.start;
+	int domain = root->segment;
+	struct pci_cfg_fixup *f;
+
+	if (!mcfg_table)
+		return &pci_generic_ecam_ops;
+
+	/*
+	 * Match against platform specific quirks and return
corresponding
quoted
+	 * CAM ops.
+	 *
+	 * First match against PCI topology <domain:bus> then use OEM ID
and
quoted
+	 * OEM revision from MCFG table standard header.
+	 */
+	for (f = __start_acpi_mcfg_fixups; f < __end_acpi_mcfg_fixups;
f++) {
quoted
+		if ((f->domain == domain || f->domain ==
PCI_MCFG_DOMAIN_ANY) &&
quoted
+		    (f->bus_num == bus_num || f->bus_num ==
PCI_MCFG_BUS_ANY) &&
quoted
+		    (!strncmp(f->oem_id, mcfg_table->header.oem_id,
+			      ACPI_OEM_ID_SIZE)) &&
+		    (f->oem_revision == mcfg_table->header.oem_revision))
Is this more likely to be updated between quirky and fixed platforms
than oem_table_id? What do folks think about using oem_table_id instead
of, or in addition to, oem_revision?
 From my understanding we need to stick to this mechanism as (otherwise)
there are platforms out in the field that would need a FW update.

So I don't think that using oem_table_id "instead" is possible; about
"in addition" I think it is doable, but I do not see the advantage much.
I mean that if a platform gets fixed the oem revision should change too,
Right?
I think you are correct.  My take away on discussions about using this 
style of quirk matching was that we would require the oem_revision to 
change as different quirks (or lack of quirks) were required.

David Daney

Thanks

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