Re: [RFC PATCH 1/2] pci: determine CLS more intelligently

From: David Miller
Date: Thu Jun 25 2009 - 05:05:20 EST


From: Tejun Heo <tj@xxxxxxxxxx>
Date: Thu, 25 Jun 2009 16:12:13 +0900

> sparc64 is currently the only one using PCI_CACHE_LINE_BYTES.

Feel free to add the patch below and:

Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>

Although I think it's better to declare pci_dfl_cache_line_size in
linux/pci.h instead of making every arch do the extern decl.

diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 57859ad..511a592 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -1081,3 +1081,12 @@ void pci_resource_to_user(const struct pci_dev *pdev, int bar,
*start = rp->start - offset;
*end = rp->end - offset;
}
+
+extern u8 pci_dfl_cache_line_size;
+
+static int __init pcibios_init(void)
+{
+ pci_dfl_cache_line_size = 64 >> 2;
+ return 0;
+}
+subsys_initcall(pcibios_init);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/