Re: [PATCH 1/2] msi: set 'En' bit of MSI Mapping Capability on HT platform

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, November 27, 2007 - 1:13 am

On Sun, 25 Nov 2007 11:21:48 +0800 "peerchen" <peerchen@gmail.com> wrote:


This inclusion makes msi.c x86-specific whereas it previously was not.  I
assume that this change breaks arm, ia64, sparc64 and powerpc.

I'll queue the below ugliness to avoid this, but it would be nicer to move
these functions out to an arch-specific file and then require that all
MSI-using architectures implement them.

diff -puN drivers/pci/msi.c~msi-set-en-bit-of-msi-mapping-capability-on-ht-platform-fix drivers/pci/msi.c
--- a/drivers/pci/msi.c~msi-set-en-bit-of-msi-mapping-capability-on-ht-platform-fix
+++ a/drivers/pci/msi.c
@@ -20,7 +20,9 @@
 #include <asm/errno.h>
 #include <asm/io.h>
 
+#ifdef CONFIG_X86
 #include <asm/k8.h>
+#endif
 
 #include "pci.h"
 #include "msi.h"
@@ -292,6 +294,7 @@ void pci_restore_msi_state(struct pci_de
 }
 #endif	/* CONFIG_PM */
 
+#ifdef CONFIG_X86
 /*
  * pci_enable_msi_ht_cap - Set the HT MSI mapping capability En bit of
  * a device.
@@ -384,6 +387,12 @@ static int pci_check_msi_ht_cap(struct p
 	}
 	return 0;
 }
+#else
+static inline int pci_check_msi_ht_cap(struct pci_dev *dev)
+{
+	return 0;
+}
+#endif
 
 /**
  * msi_capability_init - configure device's MSI capability structure
_

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] msi: set 'En' bit of MSI Mapping Capabilit ..., Sébastien Dugué, (Mon Nov 26, 2:43 am)
Re: [PATCH 1/2] msi: set 'En' bit of MSI Mapping Capabilit ..., Andrew Morton, (Tue Nov 27, 1:13 am)