blob: 55aa892a53e38f43fdacbaed23049e08f7356648 [file] [log] [blame]
Joerg Roedel736baef2012-03-30 11:47:00 -07001/*
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_INTR_REMAPPING_H
23#define __X86_INTR_REMAPPING_H
24
25#ifdef CONFIG_IRQ_REMAP
26
27extern int intr_remapping_enabled;
28
29extern void setup_intr_remapping(void);
30extern int intr_remapping_supported(void);
31extern int intr_hardware_init(void);
32extern int intr_hardware_enable(void);
Joerg Roedel4f3d8b62012-03-30 11:47:01 -070033extern void intr_hardware_disable(void);
34extern int intr_hardware_reenable(int);
35extern int intr_enable_fault_handling(void);
Joerg Roedel736baef2012-03-30 11:47:00 -070036
37#else /* CONFIG_IRQ_REMAP */
38
39#define intr_remapping_enabled 0
40
41static inline void setup_intr_remapping(void) { }
42static inline int intr_remapping_supported(void) { return 0; }
43static inline int intr_hardware_init(void) { return -ENODEV; }
44static inline int intr_hardware_enable(void) { return -ENODEV; }
Joerg Roedel4f3d8b62012-03-30 11:47:01 -070045static inline void intr_hardware_disable(void) { }
46static inline int intr_hardware_reenable(int eim) { return -ENODEV; }
47static inline int intr_enable_fault_handling(void) { return -ENODEV; }
Joerg Roedel736baef2012-03-30 11:47:00 -070048
49#endif /* CONFIG_IRQ_REMAP */
50
51#endif /* __X86_INTR_REMAPPING_H */