Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139321
b: refs/heads/master
c: 11df1f0
h: refs/heads/master
i:
  139319: ff11fe1
v: v3
  • Loading branch information
Michael Ellerman authored and Jesse Barnes committed Mar 20, 2009
1 parent 058edc5 commit bde67a4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b43d451385ef833e0696032aac2629da04d46c59
refs/heads/master: 11df1f05514beaf0269484191007dbc8d47e0e6f
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ extern int pci_domain_nr(struct pci_bus *bus);
/* Decide whether to display the domain number in /proc */
extern int pci_proc_domain(struct pci_bus *bus);

/* MSI arch hooks */
#define arch_setup_msi_irqs arch_setup_msi_irqs
#define arch_teardown_msi_irqs arch_teardown_msi_irqs
#define arch_msi_check_device arch_msi_check_device

struct vm_area_struct;
/* Map a range of PCI memory or I/O space for a device into user space */
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ static inline void early_quirks(void) { }

extern void pci_iommu_alloc(void);

/* MSI arch hook */
#define arch_setup_msi_irqs arch_setup_msi_irqs

#endif /* __KERNEL__ */

#ifdef CONFIG_X86_32
Expand Down
26 changes: 9 additions & 17 deletions trunk/drivers/pci/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,15 @@ static int pci_msi_enable = 1;

/* Arch hooks */

int __attribute__ ((weak))
arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
#ifndef arch_msi_check_device
int arch_msi_check_device(struct pci_dev *dev, int nvec, int type)
{
return 0;
}
#endif

int __attribute__ ((weak))
arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *entry)
{
return 0;
}

int __attribute__ ((weak))
arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
#ifndef arch_setup_msi_irqs
int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
struct msi_desc *entry;
int ret;
Expand All @@ -53,14 +48,10 @@ arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)

return 0;
}
#endif

void __attribute__ ((weak)) arch_teardown_msi_irq(unsigned int irq)
{
return;
}

void __attribute__ ((weak))
arch_teardown_msi_irqs(struct pci_dev *dev)
#ifndef arch_teardown_msi_irqs
void arch_teardown_msi_irqs(struct pci_dev *dev)
{
struct msi_desc *entry;

Expand All @@ -69,6 +60,7 @@ arch_teardown_msi_irqs(struct pci_dev *dev)
arch_teardown_msi_irq(entry->irq);
}
}
#endif

static void __msi_set_enable(struct pci_dev *dev, int pos, int enable)
{
Expand Down

0 comments on commit bde67a4

Please sign in to comment.