diff options
Diffstat (limited to 'arch/sparc64/kernel/pci_impl.h')
-rw-r--r-- | arch/sparc64/kernel/pci_impl.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/pci_impl.h b/arch/sparc64/kernel/pci_impl.h index f660c2b685eb..ccbb188f2e61 100644 --- a/arch/sparc64/kernel/pci_impl.h +++ b/arch/sparc64/kernel/pci_impl.h | |||
@@ -29,6 +29,33 @@ | |||
29 | #define PCI_STC_FLUSHFLAG_SET(STC) \ | 29 | #define PCI_STC_FLUSHFLAG_SET(STC) \ |
30 | (*((STC)->strbuf_flushflag) != 0UL) | 30 | (*((STC)->strbuf_flushflag) != 0UL) |
31 | 31 | ||
32 | #ifdef CONFIG_PCI_MSI | ||
33 | struct pci_pbm_info; | ||
34 | struct sparc64_msiq_ops { | ||
35 | int (*get_head)(struct pci_pbm_info *pbm, unsigned long msiqid, | ||
36 | unsigned long *head); | ||
37 | int (*dequeue_msi)(struct pci_pbm_info *pbm, unsigned long msiqid, | ||
38 | unsigned long *head, unsigned long *msi); | ||
39 | int (*set_head)(struct pci_pbm_info *pbm, unsigned long msiqid, | ||
40 | unsigned long head); | ||
41 | int (*msi_setup)(struct pci_pbm_info *pbm, unsigned long msiqid, | ||
42 | unsigned long msi, int is_msi64); | ||
43 | int (*msi_teardown)(struct pci_pbm_info *pbm, unsigned long msi); | ||
44 | int (*msiq_alloc)(struct pci_pbm_info *pbm); | ||
45 | void (*msiq_free)(struct pci_pbm_info *pbm); | ||
46 | int (*msiq_build_irq)(struct pci_pbm_info *pbm, unsigned long msiqid, | ||
47 | unsigned long devino); | ||
48 | }; | ||
49 | |||
50 | extern void sparc64_pbm_msi_init(struct pci_pbm_info *pbm, | ||
51 | const struct sparc64_msiq_ops *ops); | ||
52 | |||
53 | struct sparc64_msiq_cookie { | ||
54 | struct pci_pbm_info *pbm; | ||
55 | unsigned long msiqid; | ||
56 | }; | ||
57 | #endif | ||
58 | |||
32 | struct pci_controller_info; | 59 | struct pci_controller_info; |
33 | 60 | ||
34 | struct pci_pbm_info { | 61 | struct pci_pbm_info { |
@@ -90,6 +117,8 @@ struct pci_pbm_info { | |||
90 | u32 msiq_ent_count; | 117 | u32 msiq_ent_count; |
91 | u32 msiq_first; | 118 | u32 msiq_first; |
92 | u32 msiq_first_devino; | 119 | u32 msiq_first_devino; |
120 | u32 msiq_rotor; | ||
121 | struct sparc64_msiq_cookie *msiq_irq_cookies; | ||
93 | u32 msi_num; | 122 | u32 msi_num; |
94 | u32 msi_first; | 123 | u32 msi_first; |
95 | u32 msi_data_mask; | 124 | u32 msi_data_mask; |
@@ -100,9 +129,11 @@ struct pci_pbm_info { | |||
100 | u32 msi64_len; | 129 | u32 msi64_len; |
101 | void *msi_queues; | 130 | void *msi_queues; |
102 | unsigned long *msi_bitmap; | 131 | unsigned long *msi_bitmap; |
132 | unsigned int *msi_irq_table; | ||
103 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, | 133 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, |
104 | struct msi_desc *entry); | 134 | struct msi_desc *entry); |
105 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); | 135 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); |
136 | const struct sparc64_msiq_ops *msi_ops; | ||
106 | #endif /* !(CONFIG_PCI_MSI) */ | 137 | #endif /* !(CONFIG_PCI_MSI) */ |
107 | 138 | ||
108 | /* This PBM's streaming buffer. */ | 139 | /* This PBM's streaming buffer. */ |