diff options
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 3aca9f29d30e..cbd97ce0b000 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -90,27 +90,41 @@ int irq_set_handler_data(unsigned int irq, void *data) | |||
90 | EXPORT_SYMBOL(irq_set_handler_data); | 90 | EXPORT_SYMBOL(irq_set_handler_data); |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * irq_set_msi_desc - set MSI descriptor data for an irq | 93 | * irq_set_msi_desc_off - set MSI descriptor data for an irq at offset |
94 | * @irq: Interrupt number | 94 | * @irq_base: Interrupt number base |
95 | * @entry: Pointer to MSI descriptor data | 95 | * @irq_offset: Interrupt number offset |
96 | * @entry: Pointer to MSI descriptor data | ||
96 | * | 97 | * |
97 | * Set the MSI descriptor entry for an irq | 98 | * Set the MSI descriptor entry for an irq at offset |
98 | */ | 99 | */ |
99 | int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry) | 100 | int irq_set_msi_desc_off(unsigned int irq_base, unsigned int irq_offset, |
101 | struct msi_desc *entry) | ||
100 | { | 102 | { |
101 | unsigned long flags; | 103 | unsigned long flags; |
102 | struct irq_desc *desc = irq_get_desc_lock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL); | 104 | struct irq_desc *desc = irq_get_desc_lock(irq_base + irq_offset, &flags, IRQ_GET_DESC_CHECK_GLOBAL); |
103 | 105 | ||
104 | if (!desc) | 106 | if (!desc) |
105 | return -EINVAL; | 107 | return -EINVAL; |
106 | desc->irq_data.msi_desc = entry; | 108 | desc->irq_data.msi_desc = entry; |
107 | if (entry) | 109 | if (entry && !irq_offset) |
108 | entry->irq = irq; | 110 | entry->irq = irq_base; |
109 | irq_put_desc_unlock(desc, flags); | 111 | irq_put_desc_unlock(desc, flags); |
110 | return 0; | 112 | return 0; |
111 | } | 113 | } |
112 | 114 | ||
113 | /** | 115 | /** |
116 | * irq_set_msi_desc - set MSI descriptor data for an irq | ||
117 | * @irq: Interrupt number | ||
118 | * @entry: Pointer to MSI descriptor data | ||
119 | * | ||
120 | * Set the MSI descriptor entry for an irq | ||
121 | */ | ||
122 | int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry) | ||
123 | { | ||
124 | return irq_set_msi_desc_off(irq, 0, entry); | ||
125 | } | ||
126 | |||
127 | /** | ||
114 | * irq_set_chip_data - set irq chip data for an irq | 128 | * irq_set_chip_data - set irq chip data for an irq |
115 | * @irq: Interrupt number | 129 | * @irq: Interrupt number |
116 | * @data: Pointer to chip specific data | 130 | * @data: Pointer to chip specific data |