diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2011-05-18 19:31:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-20 07:40:52 -0400 |
commit | 31dce14a3269843f98ce1bc37d0c91b22f1991ee (patch) | |
tree | 66a02547580d22cc31648fd27169940b50c01ce4 /arch/x86/include | |
parent | 4c79185cdb1425fb74241d0be772ff1a9913091a (diff) |
x86, ioapic: Use ioapic_saved_data while enabling intr-remapping
Code flow for enabling interrupt-remapping was
allocating/freeing buffers for saving/restoring io-apic RTE's.
ioapic suspend/resume code uses boot time allocated
ioapic_saved_data that is a perfect match for reuse here.
This will remove the unnecessary allocation/free of the
temporary buffers during suspend/resume of interrupt-remapping
enabled platforms aswell as paving the way for further code
consolidation.
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/20110518233157.574469296@sbsiddha-MOBL3.sc.intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index a97a240f67f3..f46984e45094 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -152,11 +152,9 @@ extern void ioapic_insert_resources(void); | |||
152 | 152 | ||
153 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); | 153 | int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); |
154 | 154 | ||
155 | extern struct IO_APIC_route_entry **alloc_ioapic_entries(void); | 155 | extern int save_ioapic_entries(void); |
156 | extern void free_ioapic_entries(struct IO_APIC_route_entry **ioapic_entries); | 156 | extern void mask_ioapic_entries(void); |
157 | extern int save_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | 157 | extern int restore_ioapic_entries(void); |
158 | extern void mask_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | ||
159 | extern int restore_IO_APIC_setup(struct IO_APIC_route_entry **ioapic_entries); | ||
160 | 158 | ||
161 | extern int get_nr_irqs_gsi(void); | 159 | extern int get_nr_irqs_gsi(void); |
162 | 160 | ||
@@ -192,19 +190,13 @@ struct io_apic_irq_attr; | |||
192 | static inline int io_apic_set_pci_routing(struct device *dev, int irq, | 190 | static inline int io_apic_set_pci_routing(struct device *dev, int irq, |
193 | struct io_apic_irq_attr *irq_attr) { return 0; } | 191 | struct io_apic_irq_attr *irq_attr) { return 0; } |
194 | 192 | ||
195 | static inline struct IO_APIC_route_entry **alloc_ioapic_entries(void) | 193 | static inline int save_ioapic_entries(void) |
196 | { | ||
197 | return NULL; | ||
198 | } | ||
199 | |||
200 | static inline void free_ioapic_entries(struct IO_APIC_route_entry **ent) { } | ||
201 | static inline int save_IO_APIC_setup(struct IO_APIC_route_entry **ent) | ||
202 | { | 194 | { |
203 | return -ENOMEM; | 195 | return -ENOMEM; |
204 | } | 196 | } |
205 | 197 | ||
206 | static inline void mask_IO_APIC_setup(struct IO_APIC_route_entry **ent) { } | 198 | static inline void mask_ioapic_entries(void) { } |
207 | static inline int restore_IO_APIC_setup(struct IO_APIC_route_entry **ent) | 199 | static inline int restore_ioapic_entries(void) |
208 | { | 200 | { |
209 | return -ENOMEM; | 201 | return -ENOMEM; |
210 | } | 202 | } |