Commit c116c5457c46edb767df6f4e36d4905e3514ad37
Committed by
H. Peter Anvin
1 parent
efa631c26d
Exists in
master
and in
7 other branches
x86, swiotlb: Make SWIOTLB use IOMMU_INIT_* macros.
We utilize the IOMMU_INIT macros to create this dependency: [pci_xen_swiotlb_detect] | [pci_swiotlb_detect_override] | [pci_swiotlb_detect_4gb] And set the SWIOTLB IOMMU_INIT to utilize 'pci_swiotlb_init' for .init and 'pci_swiotlb_late_init' for .late_init. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> LKML-Reference: <1282845485-8991-6-git-send-email-konrad.wilk@oracle.com> CC: Fujita Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff
arch/x86/kernel/pci-swiotlb.c
... | ... | @@ -10,7 +10,8 @@ |
10 | 10 | #include <asm/iommu.h> |
11 | 11 | #include <asm/swiotlb.h> |
12 | 12 | #include <asm/dma.h> |
13 | - | |
13 | +#include <asm/xen/swiotlb-xen.h> | |
14 | +#include <asm/iommu_table.h> | |
14 | 15 | int swiotlb __read_mostly; |
15 | 16 | |
16 | 17 | static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, |
... | ... | @@ -55,6 +56,10 @@ |
55 | 56 | |
56 | 57 | return use_swiotlb; |
57 | 58 | } |
59 | +IOMMU_INIT_FINISH(pci_swiotlb_detect_override, | |
60 | + pci_xen_swiotlb_detect, | |
61 | + pci_swiotlb_init, | |
62 | + pci_swiotlb_late_init); | |
58 | 63 | |
59 | 64 | /* |
60 | 65 | * if 4GB or more detected (and iommu=off not set) return 1 |
... | ... | @@ -69,6 +74,10 @@ |
69 | 74 | #endif |
70 | 75 | return swiotlb; |
71 | 76 | } |
77 | +IOMMU_INIT(pci_swiotlb_detect_4gb, | |
78 | + pci_swiotlb_detect_override, | |
79 | + pci_swiotlb_init, | |
80 | + pci_swiotlb_late_init); | |
72 | 81 | |
73 | 82 | void __init pci_swiotlb_init(void) |
74 | 83 | { |