iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
[deliverable/linux.git] / arch / x86 / include / asm / irq_remapping.h
CommitLineData
736baef4
JR
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
8a8f422d
SS
22#ifndef __X86_IRQ_REMAPPING_H
23#define __X86_IRQ_REMAPPING_H
736baef4 24
399988ee 25#include <asm/io_apic.h>
736baef4 26
399988ee 27#ifdef CONFIG_IRQ_REMAP
0c3f173a 28
95a02e97
SS
29extern void setup_irq_remapping_ops(void);
30extern int irq_remapping_supported(void);
03bbcb2e 31extern void set_irq_remapping_broken(void);
95a02e97
SS
32extern int irq_remapping_prepare(void);
33extern int irq_remapping_enable(void);
34extern void irq_remapping_disable(void);
35extern int irq_remapping_reenable(int);
36extern int irq_remap_enable_fault_handling(void);
37extern int setup_ioapic_remapped_entry(int irq,
38 struct IO_APIC_route_entry *entry,
39 unsigned int destination,
40 int vector,
41 struct io_apic_irq_attr *attr);
95a02e97
SS
42extern void free_remapped_irq(int irq);
43extern void compose_remapped_msi_msg(struct pci_dev *pdev,
44 unsigned int irq, unsigned int dest,
45 struct msi_msg *msg, u8 hpet_id);
95a02e97 46extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id);
6a9f5de2 47extern void panic_if_irq_remap(const char *msg);
2976fd84
JR
48extern bool setup_remapped_irq(int irq,
49 struct irq_cfg *cfg,
50 struct irq_chip *chip);
736baef4 51
9b1b0e42
JR
52void irq_remap_modify_chip_defaults(struct irq_chip *chip);
53
736baef4
JR
54#else /* CONFIG_IRQ_REMAP */
55
95a02e97
SS
56static inline void setup_irq_remapping_ops(void) { }
57static inline int irq_remapping_supported(void) { return 0; }
03bbcb2e 58static inline void set_irq_remapping_broken(void) { }
95a02e97
SS
59static inline int irq_remapping_prepare(void) { return -ENODEV; }
60static inline int irq_remapping_enable(void) { return -ENODEV; }
61static inline void irq_remapping_disable(void) { }
62static inline int irq_remapping_reenable(int eim) { return -ENODEV; }
63static inline int irq_remap_enable_fault_handling(void) { return -ENODEV; }
64static inline int setup_ioapic_remapped_entry(int irq,
65 struct IO_APIC_route_entry *entry,
66 unsigned int destination,
67 int vector,
68 struct io_apic_irq_attr *attr)
0c3f173a
JR
69{
70 return -ENODEV;
71}
95a02e97
SS
72static inline void free_remapped_irq(int irq) { }
73static inline void compose_remapped_msi_msg(struct pci_dev *pdev,
74 unsigned int irq, unsigned int dest,
75 struct msi_msg *msg, u8 hpet_id)
5e2b930b
JR
76{
77}
95a02e97 78static inline int setup_hpet_msi_remapped(unsigned int irq, unsigned int id)
5e2b930b
JR
79{
80 return -ENODEV;
81}
6a9f5de2
JR
82
83static inline void panic_if_irq_remap(const char *msg)
84{
85}
9b1b0e42 86
9b1b0e42
JR
87static inline void irq_remap_modify_chip_defaults(struct irq_chip *chip)
88{
89}
90
2976fd84
JR
91static inline bool setup_remapped_irq(int irq,
92 struct irq_cfg *cfg,
93 struct irq_chip *chip)
94{
95 return false;
96}
736baef4
JR
97#endif /* CONFIG_IRQ_REMAP */
98
8a8f422d 99#endif /* __X86_IRQ_REMAPPING_H */
This page took 0.095246 seconds and 5 git commands to generate.