diff options
author | Joerg Roedel <joro@8bytes.org> | 2012-09-26 12:44:39 +0200 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-01-28 12:17:26 +0100 |
commit | 373dd7a27f2469020e7b56744cf47b82986b9749 (patch) | |
tree | 1fb77f5d3b11ad5d2c97c1244e1460cabb94593a /arch/x86/include | |
parent | 5afba62cc8a16716508605e02c1b02ee5f969184 (diff) | |
download | linux-3.10-373dd7a27f2469020e7b56744cf47b82986b9749.tar.gz linux-3.10-373dd7a27f2469020e7b56744cf47b82986b9749.tar.bz2 linux-3.10-373dd7a27f2469020e7b56744cf47b82986b9749.zip |
x86, io_apic: Introduce set_affinity function pointer
With interrupt remapping a special function is used to
change the affinity of an IO-APIC interrupt. Abstract this
with a function pointer.
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Acked-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/irq_remapping.h | 9 | ||||
-rw-r--r-- | arch/x86/include/asm/x86_init.h | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 21aa81e6ec2..a744cbbe02d 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h @@ -182,6 +182,9 @@ extern void native_io_apic_modify(unsigned int apic, unsigned int reg, unsigned extern void native_disable_io_apic(void); extern void native_io_apic_print_entries(unsigned int apic, unsigned int nr_entries); extern void intel_ir_io_apic_print_entries(unsigned int apic, unsigned int nr_entries); +extern int native_ioapic_set_affinity(struct irq_data *, + const struct cpumask *, + bool); static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) { @@ -228,6 +231,7 @@ static inline void disable_ioapic_support(void) { } #define native_io_apic_modify NULL #define native_disable_io_apic NULL #define native_io_apic_print_entries NULL +#define native_ioapic_set_affinity NULL #endif #endif /* _ASM_X86_IO_APIC_H */ diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h index 0ee1e88bd17..f1afa04c3f6 100644 --- a/arch/x86/include/asm/irq_remapping.h +++ b/arch/x86/include/asm/irq_remapping.h @@ -40,9 +40,6 @@ extern int setup_ioapic_remapped_entry(int irq, unsigned int destination, int vector, struct io_apic_irq_attr *attr); -extern int set_remapped_irq_affinity(struct irq_data *data, - const struct cpumask *mask, - bool force); extern void free_remapped_irq(int irq); extern void compose_remapped_msi_msg(struct pci_dev *pdev, unsigned int irq, unsigned int dest, @@ -68,12 +65,6 @@ static inline int setup_ioapic_remapped_entry(int irq, { return -ENODEV; } -static inline int set_remapped_irq_affinity(struct irq_data *data, - const struct cpumask *mask, - bool force) -{ - return 0; -} static inline void free_remapped_irq(int irq) { } static inline void compose_remapped_msi_msg(struct pci_dev *pdev, unsigned int irq, unsigned int dest, diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 1ee10ca4667..20d9f97c14a 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -190,6 +190,9 @@ struct x86_msi_ops { int (*setup_hpet_msi)(unsigned int irq, unsigned int id); }; +struct irq_data; +struct cpumask; + struct x86_io_apic_ops { void (*init) (void); unsigned int (*read) (unsigned int apic, unsigned int reg); @@ -197,6 +200,9 @@ struct x86_io_apic_ops { void (*modify) (unsigned int apic, unsigned int reg, unsigned int value); void (*disable)(void); void (*print_entries)(unsigned int apic, unsigned int nr_entries); + int (*set_affinity)(struct irq_data *data, + const struct cpumask *mask, + bool force); }; extern struct x86_init_ops x86_init; |