Skip to content

Commit 485734f

Browse files
Christoph HellwigIngo Molnar
authored andcommitted
x86/swiotlb: Enable swiotlb for > 4GiG RAM on 32-bit kernels
We already build the swiotlb code for 32-bit kernels with PAE support, but the code to actually use swiotlb has only been enabled for 64-bit kernels for an unknown reason. Before Linux v4.18 we paper over this fact because the networking code, the SCSI layer and some random block drivers implemented their own bounce buffering scheme. [ mingo: Changelog fixes. ] Fixes: 21e07db ("scsi: reduce use of block bounce buffers") Fixes: ab74cfe ("net: remove the PCI_DMA_BUS_IS_PHYS check in illegal_highdma") Reported-by: Matthew Whitehead <tedheadster@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Matthew Whitehead <tedheadster@gmail.com> Cc: konrad.wilk@oracle.com Cc: iommu@lists.linux-foundation.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20181014075208.2715-1-hch@lst.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 2224d61 commit 485734f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

arch/x86/kernel/pci-swiotlb.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ IOMMU_INIT_FINISH(pci_swiotlb_detect_override,
4242
int __init pci_swiotlb_detect_4gb(void)
4343
{
4444
/* don't initialize swiotlb if iommu=off (no_iommu=1) */
45-
#ifdef CONFIG_X86_64
4645
if (!no_iommu && max_possible_pfn > MAX_DMA32_PFN)
4746
swiotlb = 1;
48-
#endif
4947

5048
/*
5149
* If SME is active then swiotlb will be set to 1 so that bounce

0 commit comments

Comments
 (0)