diff options
author | Christoph Hellwig <hch@lst.de> | 2019-08-13 09:25:09 +0200 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2019-08-16 11:33:57 -0700 |
commit | 974f83ec1e5afeeb4c9028feb74ffa4ee70e71b7 (patch) | |
tree | 79d9378ae00206cda4d2a41f2a79361b014c4fb5 /arch/ia64/include | |
parent | 16567ca85fce11e2a20f22404ed0ceb133c4408e (diff) | |
download | linux-974f83ec1e5afeeb4c9028feb74ffa4ee70e71b7.tar.gz linux-974f83ec1e5afeeb4c9028feb74ffa4ee70e71b7.tar.bz2 linux-974f83ec1e5afeeb4c9028feb74ffa4ee70e71b7.zip |
ia64: rework iommu probing
ia64 currently organizes the iommu probing along machves, which isn't
very helpful. Instead just try to probe for Intel IOMMUs in mem_init
as they are properly described in ACPI and if none was found initialize
the swiotlb buffer. The HP SBA handling is then only done delayed when
the actual hardware is probed. Only in the case that we actually found
usable IOMMUs we then set up the DMA ops and free the not needed
swiotlb buffer. This scheme gets rid of the need for the dma_init
machvec operation, and the dig_vtd machvec.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lkml.kernel.org/r/20190813072514.23299-24-hch@lst.de
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include')
-rw-r--r-- | arch/ia64/include/asm/acpi.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec.h | 11 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec_dig_vtd.h | 19 | ||||
-rw-r--r-- | arch/ia64/include/asm/machvec_hpzx1.h | 2 | ||||
-rw-r--r-- | arch/ia64/include/asm/pci.h | 3 |
5 files changed, 0 insertions, 37 deletions
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index 9e563df73038..be6bf3e499a6 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h @@ -43,8 +43,6 @@ static inline const char *acpi_get_sysname (void) return "uv"; # elif defined (CONFIG_IA64_DIG) return "dig"; -# elif defined(CONFIG_IA64_DIG_VTD) - return "dig_vtd"; # else # error Unknown platform. Fix acpi.c. # endif diff --git a/arch/ia64/include/asm/machvec.h b/arch/ia64/include/asm/machvec.h index fa867e980d87..b22d0499b58c 100644 --- a/arch/ia64/include/asm/machvec.h +++ b/arch/ia64/include/asm/machvec.h @@ -16,14 +16,11 @@ struct device; typedef void ia64_mv_setup_t (char **); -typedef void ia64_mv_dma_init (void); extern void machvec_setup (char **); # if defined (CONFIG_IA64_DIG) # include <asm/machvec_dig.h> -# elif defined(CONFIG_IA64_DIG_VTD) -# include <asm/machvec_dig_vtd.h> # elif defined (CONFIG_IA64_HP_ZX1) # include <asm/machvec_hpzx1.h> # elif defined (CONFIG_IA64_SGI_UV) @@ -35,7 +32,6 @@ extern void machvec_setup (char **); # else # define ia64_platform_name ia64_mv.name # define platform_setup ia64_mv.setup -# define platform_dma_init ia64_mv.dma_init # endif /* __attribute__((__aligned__(16))) is required to make size of the @@ -46,14 +42,12 @@ extern void machvec_setup (char **); struct ia64_machine_vector { const char *name; ia64_mv_setup_t *setup; - ia64_mv_dma_init *dma_init; } __attribute__((__aligned__(16))); /* align attrib? see above comment */ #define MACHVEC_INIT(name) \ { \ #name, \ platform_setup, \ - platform_dma_init, \ } extern struct ia64_machine_vector ia64_mv; @@ -64,8 +58,6 @@ extern void machvec_init_from_cmdline(const char *cmdline); # error Unknown configuration. Update arch/ia64/include/asm/machvec.h. # endif /* CONFIG_IA64_GENERIC */ -extern void swiotlb_dma_init(void); - /* * Define default versions so we can extend machvec for new platforms without having * to update the machvec files for all existing platforms. @@ -73,8 +65,5 @@ extern void swiotlb_dma_init(void); #ifndef platform_setup # define platform_setup machvec_setup #endif -#ifndef platform_dma_init -# define platform_dma_init swiotlb_dma_init -#endif #endif /* _ASM_IA64_MACHVEC_H */ diff --git a/arch/ia64/include/asm/machvec_dig_vtd.h b/arch/ia64/include/asm/machvec_dig_vtd.h deleted file mode 100644 index bb44eb9039dd..000000000000 --- a/arch/ia64/include/asm/machvec_dig_vtd.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _ASM_IA64_MACHVEC_DIG_VTD_h -#define _ASM_IA64_MACHVEC_DIG_VTD_h - -extern ia64_mv_setup_t dig_setup; -extern ia64_mv_dma_init pci_iommu_alloc; - -/* - * This stuff has dual use! - * - * For a generic kernel, the macros are used to initialize the - * platform's machvec structure. When compiling a non-generic kernel, - * the macros are used directly. - */ -#define ia64_platform_name "dig_vtd" -#define platform_setup dig_setup -#define platform_dma_init pci_iommu_alloc - -#endif /* _ASM_IA64_MACHVEC_DIG_VTD_h */ diff --git a/arch/ia64/include/asm/machvec_hpzx1.h b/arch/ia64/include/asm/machvec_hpzx1.h index 5299ac38bfb6..7d37998ffdbf 100644 --- a/arch/ia64/include/asm/machvec_hpzx1.h +++ b/arch/ia64/include/asm/machvec_hpzx1.h @@ -3,7 +3,6 @@ #define _ASM_IA64_MACHVEC_HPZX1_h extern ia64_mv_setup_t dig_setup; -extern ia64_mv_dma_init sba_dma_init; /* * This stuff has dual use! @@ -14,6 +13,5 @@ extern ia64_mv_dma_init sba_dma_init; */ #define ia64_platform_name "hpzx1" #define platform_setup dig_setup -#define platform_dma_init sba_dma_init #endif /* _ASM_IA64_MACHVEC_HPZX1_h */ diff --git a/arch/ia64/include/asm/pci.h b/arch/ia64/include/asm/pci.h index ef91b780a3f2..8c163d1d0189 100644 --- a/arch/ia64/include/asm/pci.h +++ b/arch/ia64/include/asm/pci.h @@ -69,7 +69,4 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14); } -#ifdef CONFIG_INTEL_IOMMU -extern void pci_iommu_alloc(void); -#endif #endif /* _ASM_IA64_PCI_H */ |