bdab0ba3d9
This series of patches re-introduces the iommu_num_pages function so that it can be used by each architecture specific IOMMU implementations. The series also changes IOMMU implementations for X86, Alpha, PowerPC and UltraSparc. The other implementations are not yet changed because the modifications required are not obvious and I can't test them on real hardware. This patch: This is a preparation patch for introducing a generic iommu_num_pages function. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
#ifndef ASM_X86__IOMMU_H
|
|
#define ASM_X86__IOMMU_H
|
|
|
|
extern void pci_iommu_shutdown(void);
|
|
extern void no_iommu_init(void);
|
|
extern struct dma_mapping_ops nommu_dma_ops;
|
|
extern int force_iommu, no_iommu;
|
|
extern int iommu_detected;
|
|
extern int dmar_disabled;
|
|
|
|
extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
|
|
|
|
#ifdef CONFIG_GART_IOMMU
|
|
extern int gart_iommu_aperture;
|
|
extern int gart_iommu_aperture_allowed;
|
|
extern int gart_iommu_aperture_disabled;
|
|
|
|
extern void early_gart_iommu_check(void);
|
|
extern void gart_iommu_init(void);
|
|
extern void gart_iommu_shutdown(void);
|
|
extern void __init gart_parse_options(char *);
|
|
extern void gart_iommu_hole_init(void);
|
|
|
|
#else
|
|
#define gart_iommu_aperture 0
|
|
#define gart_iommu_aperture_allowed 0
|
|
#define gart_iommu_aperture_disabled 1
|
|
|
|
static inline void early_gart_iommu_check(void)
|
|
{
|
|
}
|
|
static inline void gart_iommu_init(void)
|
|
{
|
|
}
|
|
static inline void gart_iommu_shutdown(void)
|
|
{
|
|
}
|
|
static inline void gart_parse_options(char *options)
|
|
{
|
|
}
|
|
static inline void gart_iommu_hole_init(void)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* ASM_X86__IOMMU_H */
|