aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/irq_remapping.h
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2012-03-30 14:47:08 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2012-05-07 08:35:00 -0400
commit8a8f422d3b4f2cde8e0e1d31638279a26a886a82 (patch)
tree8d8a4387a45f962cd0fa4e9e24335e790adad0d4 /arch/x86/include/asm/irq_remapping.h
parent95a02e976c39d63716b8c7c226bc530a2041536f (diff)
iommu: rename intr_remapping.[ch] to irq_remapping.[ch]
Make the file names consistent with the naming conventions of irq subsystem. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Joerg Roedel <joerg.roedel@amd.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/include/asm/irq_remapping.h')
-rw-r--r--arch/x86/include/asm/irq_remapping.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
new file mode 100644
index 000000000000..dcb0c7231028
--- /dev/null
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -0,0 +1,103 @@
1/*
2 * Copyright (C) 2012 Advanced Micro Devices, Inc.
3 * Author: Joerg Roedel <joerg.roedel@amd.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published
7 * by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * This header file contains the interface of the interrupt remapping code to
19 * the x86 interrupt management code.
20 */
21
22#ifndef __X86_IRQ_REMAPPING_H
23#define __X86_IRQ_REMAPPING_H
24
25#ifdef CONFIG_IRQ_REMAP
26
27struct IO_APIC_route_entry;
28struct io_apic_irq_attr;
29struct pci_dev;
30
31extern int irq_remapping_enabled;
32
33extern void setup_irq_remapping_ops(void);
34extern int irq_remapping_supported(void);
35extern int irq_remapping_prepare(void);
36extern int irq_remapping_enable(void);
37extern void irq_remapping_disable(void);
38extern int irq_remapping_reenable(int);
39extern int irq_remap_enable_fault_handling(void);
40extern int setup_ioapic_remapped_entry(int irq,
41 struct IO_APIC_route_entry *entry,
42 unsigned int destination,
43 int vector,
44 struct io_apic_irq_attr *attr);
45extern int set_remapped_irq_affinity(struct irq_data *data,
46 const struct cpumask *mask,
47 bool force);
48extern void free_remapped_irq(int irq);
49extern void compose_remapped_msi_msg(struct pci_dev *pdev,
50 unsigned int irq, unsigned int dest,
51 struct msi_msg *msg, u8 hpet_id);
52extern int msi_alloc_remapped_irq(struct pci_dev *pdev, int irq, int nvec);
53extern int msi_setup_remapped_irq(struct pci_dev *pdev, unsigned int irq,
54 int index, int sub_handle);
55extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id);
56
57#else /* CONFIG_IRQ_REMAP */
58
59#define irq_remapping_enabled 0
60
61static inline void setup_irq_remapping_ops(void) { }
62static inline int irq_remapping_supported(void) { return 0; }
63static inline int irq_remapping_prepare(void) { return -ENODEV; }
64static inline int irq_remapping_enable(void) { return -ENODEV; }
65static inline void irq_remapping_disable(void) { }
66static inline int irq_remapping_reenable(int eim) { return -ENODEV; }
67static inline int irq_remap_enable_fault_handling(void) { return -ENODEV; }
68static inline int setup_ioapic_remapped_entry(int irq,
69 struct IO_APIC_route_entry *entry,
70 unsigned int destination,
71 int vector,
72 struct io_apic_irq_attr *attr)
73{
74 return -ENODEV;
75}
76static inline int set_remapped_irq_affinity(struct irq_data *data,
77 const struct cpumask *mask,
78 bool force)
79{
80 return 0;
81}
82static inline void free_remapped_irq(int irq) { }
83static inline void compose_remapped_msi_msg(struct pci_dev *pdev,
84 unsigned int irq, unsigned int dest,
85 struct msi_msg *msg, u8 hpet_id)
86{
87}
88static inline int msi_alloc_remapped_irq(struct pci_dev *pdev, int irq, int nvec)
89{
90 return -ENODEV;
91}
92static inline int msi_setup_remapped_irq(struct pci_dev *pdev, unsigned int irq,
93 int index, int sub_handle)
94{
95 return -ENODEV;
96}
97static inline int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
98{
99 return -ENODEV;
100}
101#endif /* CONFIG_IRQ_REMAP */
102
103#endif /* __X86_IRQ_REMAPPING_H */