aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intr_remapping.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2012-03-30 14:47:00 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2012-05-07 08:34:59 -0400
commit736baef4472d00574089f295bc759ac002b9558c (patch)
treed4c9c69b1a0eecd6d87b3378a27396384e4b08f0 /drivers/iommu/intr_remapping.h
parenteef93fdb7cd41ae36794db0e765059dc1039e940 (diff)
iommu/vt-d: Make intr-remapping initialization generic
This patch introduces irq_remap_ops to hold implementation specific function pointer to handle interrupt remapping. As the first part the initialization functions for VT-d are converted to these ops. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/intr_remapping.h')
-rw-r--r--drivers/iommu/intr_remapping.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/iommu/intr_remapping.h b/drivers/iommu/intr_remapping.h
new file mode 100644
index 000000000000..d6df732e001f
--- /dev/null
+++ b/drivers/iommu/intr_remapping.h
@@ -0,0 +1,46 @@
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 stuff that is shared between different interrupt
19 * remapping drivers but with no need to be visible outside of the IOMMU layer.
20 */
21
22#ifndef __INTR_REMAPPING_H
23#define __INTR_REMAPPING_H
24
25#ifdef CONFIG_IRQ_REMAP
26
27extern int disable_intremap;
28extern int disable_sourceid_checking;
29extern int no_x2apic_optout;
30
31struct irq_remap_ops {
32 /* Check whether Interrupt Remapping is supported */
33 int (*supported)(void);
34
35 /* Initializes hardware and makes it ready for remapping interrupts */
36 int (*hardware_init)(void);
37
38 /* Enables the remapping hardware */
39 int (*hardware_enable)(void);
40};
41
42extern struct irq_remap_ops intel_irq_remap_ops;
43
44#endif /* CONFIG_IRQ_REMAP */
45
46#endif /* __INTR_REMAPPING_H */