rpms/kernel/devel linux-2.6-pci-cacheline-sizing.patch, NONE, 1.1 Makefile, 1.103, 1.104 kernel.spec, 1.1581, 1.1582

Dave Jones davej at fedoraproject.org
Sun Jun 21 22:22:51 UTC 2009


Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv310

Modified Files:
	Makefile kernel.spec 
Added Files:
	linux-2.6-pci-cacheline-sizing.patch 
Log Message:
Determine cacheline sizes in a generic manner.

linux-2.6-pci-cacheline-sizing.patch:

--- NEW FILE linux-2.6-pci-cacheline-sizing.patch ---
PCI: Use generic cacheline sizing instead of per-vendor tests.

Instead of the pci code needing to have code to determine the
cacheline size of each processor, use the data the cpu identification
code should have already determined during early boot.

I chose not to delete the existing code for the time being.
Instead I added some additional debug statements to be sure that it's
doing the right thing, and compares it against what the old code would
have done.  After this has been proven to be right in a release,
we can delete the paranoid checks, and all the old vendor checking code.

Signed-off-by: Dave Jones <davej at redhat.com>

diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 2202b62..f371fe8 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -432,6 +432,22 @@ int __init pcibios_init(void)
 	else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL)
 		pci_cache_line_size = 128 >> 2;	/* P4 */
 
+	if (c->x86_clflush_size != (pci_cache_line_size <<2))
+		printk(KERN_DEBUG "PCI: old code would have set cacheline "
+			"size to %d bytes, but clflush_size = %d\n",
+			pci_cache_line_size << 2,
+			c->x86_clflush_size);
+
+	/* Once we know this logic works, all the above code can be deleted. */
+	if (c->x86_clflush_size > 0) {
+		pci_cache_line_size = c->x86_clflush_size >> 2;
+		printk(KERN_DEBUG "PCI: pci_cache_line_size set to %d bytes\n",
+			pci_cache_line_size >> 2);
+	} else {
+		pci_cache_line_size = 32 >> 2;
+		printk(KERN_DEBUG "PCI: Unknown cacheline size. Setting to 32 bytes\n");
+	}
+
 	pcibios_resource_survey();
 
 	if (pci_bf_sort >= pci_force_bf)


Index: Makefile
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/Makefile,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -p -r1.103 -r1.104
--- Makefile	14 Apr 2009 14:43:53 -0000	1.103
+++ Makefile	21 Jun 2009 22:22:50 -0000	1.104
@@ -130,7 +130,7 @@ rhel:
 
 reconfig:
 	@rm -f kernel-*-config
-	@VERSION="2.6.29" make -f Makefile.config configs
+	@VERSION="2.6.30" make -f Makefile.config configs
 	@scripts/reconfig.sh
 
 force-tag: $(SPECFILE) $(COMMON_DIR)/branches


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1581
retrieving revision 1.1582
diff -u -p -r1.1581 -r1.1582
--- kernel.spec	21 Jun 2009 20:52:20 -0000	1.1581
+++ kernel.spec	21 Jun 2009 22:22:50 -0000	1.1582
@@ -636,6 +636,8 @@ Patch681: linux-2.6-mac80211-age-scan-re
 
 Patch800: linux-2.6-crash-driver.patch
 
+Patch900: linux-2.6-pci-cacheline-sizing.patch
+
 Patch1000: linux-2.6-neigh_-fix-state-transition-INCOMPLETE-_FAILED-via-Netlink-request.patch
 
 Patch1515: linux-2.6.29-lirc.patch
@@ -1205,6 +1207,9 @@ ApplyPatch linux-2.6-ata-quirk.patch
 # /dev/crash driver.
 ApplyPatch linux-2.6-crash-driver.patch
 
+# Determine cacheline sizes in a generic manner.
+ApplyPatch linux-2.6-pci-cacheline-sizing.patch
+
 # neigh: fix state transition INCOMPLETE->FAILED via Netlink request
 #ApplyPatch linux-2.6-neigh_-fix-state-transition-INCOMPLETE-_FAILED-via-Netlink-request.patch
 
@@ -1823,6 +1828,9 @@ fi
 # and build.
 
 %changelog
+* Sun Jun 21 2009 Dave Jones <davej at redhat.com>
+- Determine cacheline sizes in a generic manner.
+
 * Sun Jun 21 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.31-0.18.rc0.git17
 - 2.6.30-git17
 - Config changes:




More information about the fedora-extras-commits mailing list