diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-06 16:05:35 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-10-18 10:49:33 -0400 |
commit | 1525bf0d8f059a38c6e79353583854e1981b2e67 (patch) | |
tree | e9ffaebc5f2726dd57c0d427996af033af71ab6c /drivers/pci | |
parent | 7c94def89aa5091706e03b98047c074d7ac74af0 (diff) |
msi: Introduce default_[teardown|setup]_msi_irqs with fallback.
Introduce an override for the arch_[teardown|setup]_msi_irqs
that can be utilized to fallback to the default arch_* code.
If a platform wants to utilize the code paths defined
in driver/pci/msi.c it has to define HAVE_DEFAULT_MSI_TEARDOWN_IRQS
or HAVE_DEFAULT_MSI_SETUP_IRQS. Otherwise the old mechanism
of over-ridding the arch_* works fine.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: x86@kernel.org
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 5fcf5aec680f..7c24dcef2989 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -35,7 +35,12 @@ int arch_msi_check_device(struct pci_dev *dev, int nvec, int type) | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifndef arch_setup_msi_irqs | 37 | #ifndef arch_setup_msi_irqs |
38 | int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | 38 | # define arch_setup_msi_irqs default_setup_msi_irqs |
39 | # define HAVE_DEFAULT_MSI_SETUP_IRQS | ||
40 | #endif | ||
41 | |||
42 | #ifdef HAVE_DEFAULT_MSI_SETUP_IRQS | ||
43 | int default_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | ||
39 | { | 44 | { |
40 | struct msi_desc *entry; | 45 | struct msi_desc *entry; |
41 | int ret; | 46 | int ret; |
@@ -60,7 +65,12 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | |||
60 | #endif | 65 | #endif |
61 | 66 | ||
62 | #ifndef arch_teardown_msi_irqs | 67 | #ifndef arch_teardown_msi_irqs |
63 | void arch_teardown_msi_irqs(struct pci_dev *dev) | 68 | # define arch_teardown_msi_irqs default_teardown_msi_irqs |
69 | # define HAVE_DEFAULT_MSI_TEARDOWN_IRQS | ||
70 | #endif | ||
71 | |||
72 | #ifdef HAVE_DEFAULT_MSI_TEARDOWN_IRQS | ||
73 | void default_teardown_msi_irqs(struct pci_dev *dev) | ||
64 | { | 74 | { |
65 | struct msi_desc *entry; | 75 | struct msi_desc *entry; |
66 | 76 | ||