rpms/kernel/devel linux-2.6-defaults-pci_no_msi_mmconf.patch, NONE, 1.1 kernel-2.6.spec, 1.3042, 1.3043

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 4 05:38:32 UTC 2007


Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10324

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-defaults-pci_no_msi_mmconf.patch 
Log Message:
* Wed Apr 04 2007 Dave Jones <davej at redhat.com>
- Disable PCI MSI and MMCONFIG by default (cebbert)


linux-2.6-defaults-pci_no_msi_mmconf.patch:
 Documentation/kernel-parameters.txt   |    5 +++++
 arch/i386/pci/common.c                |    6 +++++-
 drivers/pci/msi.c                     |    6 +++++-
 linux-2.6.20.noarch/drivers/pci/pci.c |    2 ++
 linux-2.6.20.noarch/drivers/pci/pci.h |    2 ++
 5 files changed, 19 insertions(+), 2 deletions(-)

--- NEW FILE linux-2.6-defaults-pci_no_msi_mmconf.patch ---
Disable PCI MSI and MMCONFIG by default, add kernel parameters
to enable them.

Original mmconfig patch by Kyle McMartin <kyle at ubuntu.com>

Signed-off-by: Chuck Ebbert <cebbert at redhat.com>

---
 Documentation/kernel-parameters.txt |    5 +++++
 arch/i386/pci/common.c              |    6 +++++-
 drivers/pci/msi.c                   |    6 +++++-
 drivers/pci/pci.c                   |    2 ++
 drivers/pci/pci.h                   |    2 ++
 5 files changed, 19 insertions(+), 2 deletions(-)

--- linux-2.6.20.noarch.orig/drivers/pci/msi.c
+++ linux-2.6.20.noarch/drivers/pci/msi.c
@@ -28,7 +28,7 @@ static DEFINE_SPINLOCK(msi_lock);
 static struct msi_desc* msi_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = NULL };
 static struct kmem_cache* msi_cachep;
 
-static int pci_msi_enable = 1;
+static int pci_msi_enable = 0;
 
 static int msi_cache_init(void)
 {
@@ -977,6 +977,10 @@ void pci_no_msi(void)
 {
 	pci_msi_enable = 0;
 }
+void pci_yes_msi(void)
+{
+	pci_msi_enable = 1;
+}
 
 EXPORT_SYMBOL(pci_enable_msi);
 EXPORT_SYMBOL(pci_disable_msi);
--- linux-2.6.20.noarch.orig/Documentation/kernel-parameters.txt
+++ linux-2.6.20.noarch/Documentation/kernel-parameters.txt
@@ -1197,8 +1197,13 @@ and is between 256 and 4096 characters. 
 				Mechanism 1.
 		conf2		[IA-32] Force use of PCI Configuration
 				Mechanism 2.
+		mmconf		[IA-32,X86_64] Enable use of MMCONFIG for PCI
+				Configuration
 		nommconf	[IA-32,X86_64] Disable use of MMCONFIG for PCI
 				Configuration
+		msi		[MSI] If the PCI_MSI kernel config parameter is
+				enabled, this kernel boot option can be used to
+				enable the use of MSI interrupts system-wide.
 		nomsi		[MSI] If the PCI_MSI kernel config parameter is
 				enabled, this kernel boot option can be used to
 				disable the use of MSI interrupts system-wide.
--- linux-2.6.20.noarch.orig/arch/i386/pci/common.c
+++ linux-2.6.20.noarch/arch/i386/pci/common.c
@@ -18,7 +18,7 @@
 #include "pci.h"
 
 unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
-				PCI_PROBE_MMCONF;
+				0; /* PCI_PROBE_MMCONF */
 
 static int pci_bf_sort;
 int pci_routeirq;
@@ -292,6 +292,10 @@ char * __devinit  pcibios_setup(char *st
 		pci_probe &= ~PCI_PROBE_MMCONF;
 		return NULL;
 	}
+	else if (!strcmp(str, "mmconf")) {
+		pci_probe |= PCI_PROBE_MMCONF;
+		return NULL;
+	}
 #endif
 	else if (!strcmp(str, "noacpi")) {
 		acpi_noirq_set();
--- linux-2.6.20.noarch/drivers/pci/pci.c~	2007-04-04 01:33:08.000000000 -0400
+++ linux-2.6.20.noarch/drivers/pci/pci.c	2007-04-04 01:33:33.000000000 -0400
@@ -1358,6 +1358,8 @@ static int __devinit pci_setup(char *str
 		if (*str && (str = pcibios_setup(str)) && *str) {
 			if (!strcmp(str, "nomsi")) {
 				pci_no_msi();
+			} else if (!strcmp(str, "msi")) {
+				pci_yes_msi();
 			} else if (!strncmp(str, "cbiosize=", 9)) {
 				pci_cardbus_io_size = memparse(str + 9, &str);
 			} else if (!strncmp(str, "cbmemsize=", 10)) {
--- linux-2.6.20.noarch/drivers/pci/pci.h~	2007-04-04 01:34:07.000000000 -0400
+++ linux-2.6.20.noarch/drivers/pci/pci.h	2007-04-04 01:34:31.000000000 -0400
@@ -47,8 +47,10 @@ extern unsigned int pci_pm_d3_delay;
 
 #ifdef CONFIG_PCI_MSI
 void pci_no_msi(void);
+void pci_yes_msi(void);
 #else
 static inline void pci_no_msi(void) { }
+static inline void pci_yes_msi(void) { }
 #endif
 
 #if defined(CONFIG_PCI_MSI) && defined(CONFIG_PM)


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3042
retrieving revision 1.3043
diff -u -r1.3042 -r1.3043
--- kernel-2.6.spec	4 Apr 2007 05:30:26 -0000	1.3042
+++ kernel-2.6.spec	4 Apr 2007 05:38:29 -0000	1.3043
@@ -557,6 +557,7 @@
 Patch2103: linux-2.6-defaults-unicode-vt.patch
 Patch2104: linux-2.6-defaults-disable-split-ptlock.patch
 Patch2105: linux-2.6-defaults-nonmi.patch
+Patch2106: linux-2.6-defaults-pci_no_msi_mmconf.patch
 
 # SATA Bits
 Patch2200: linux-2.6-sata-promise-pata-ports.patch
@@ -1253,6 +1254,8 @@
 #%patch2104 -p1
 # Disable NMI watchdog by default.
 %patch2105 -p1
+# Disable MMCONFIG & MSI by default.
+%patch2106 -p1
 
 # Enable PATA ports on Promise SATA.
 #%patch2200 -p1
@@ -2250,6 +2253,9 @@
 
 %changelog
 * Wed Apr 04 2007 Dave Jones <davej at redhat.com>
+- Disable PCI MSI and MMCONFIG by default (cebbert)
+
+* Wed Apr 04 2007 Dave Jones <davej at redhat.com>
 - 2.6.21-rc5-git10
 
 * Wed Apr 04 2007 Dave Jones <davej at redhat.com>




More information about the fedora-cvs-commits mailing list