From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2C0BC6787C for ; Sun, 14 Oct 2018 09:19:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FDD62064E for ; Sun, 14 Oct 2018 09:19:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FDD62064E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zytor.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726846AbeJNQ7e (ORCPT ); Sun, 14 Oct 2018 12:59:34 -0400 Received: from terminus.zytor.com ([198.137.202.136]:40161 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbeJNQ7e (ORCPT ); Sun, 14 Oct 2018 12:59:34 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w9E9J2XU3117356 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 14 Oct 2018 02:19:02 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w9E9Ivkt3117353; Sun, 14 Oct 2018 02:18:57 -0700 Date: Sun, 14 Oct 2018 02:18:57 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Christoph Hellwig Message-ID: Cc: tedheadster@gmail.com, mingo@kernel.org, hpa@zytor.com, hch@lst.de, linux-kernel@vger.kernel.org, tglx@linutronix.de Reply-To: mingo@kernel.org, tedheadster@gmail.com, hpa@zytor.com, hch@lst.de, linux-kernel@vger.kernel.org, tglx@linutronix.de In-Reply-To: <20181014075208.2715-1-hch@lst.de> References: <20181014075208.2715-1-hch@lst.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/swiotlb: Enable swiotlb for > 4GiG ram on 32-bit kernels Git-Commit-ID: ab555321e4ddc7f6f17f6c80dfaad228883a8e7c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ab555321e4ddc7f6f17f6c80dfaad228883a8e7c Gitweb: https://git.kernel.org/tip/ab555321e4ddc7f6f17f6c80dfaad228883a8e7c Author: Christoph Hellwig AuthorDate: Sun, 14 Oct 2018 09:52:08 +0200 Committer: Thomas Gleixner CommitDate: Sun, 14 Oct 2018 11:11:23 +0200 x86/swiotlb: Enable swiotlb for > 4GiG ram on 32-bit kernels We already build the swiotlb code for 32b-t kernels with PAE support, but the code to actually use swiotlb has only been enabled for 64-bit kernel for an unknown reason. Before Linux 4.18 we paper over this fact because the networking code, the scsi layer and some random block drivers implemented their own bounce buffering scheme. Fixes: 21e07dba9fb1 ("scsi: reduce use of block bounce buffers") Fixes: ab74cfebafa3 ("net: remove the PCI_DMA_BUS_IS_PHYS check in illegal_highdma") Reported-by: tedheadster Tested-by: tedheadster Signed-off-by: Christoph Hellwig 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 --- arch/x86/kernel/pci-swiotlb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c index 661583662430..71c0b01d93b1 100644 --- a/arch/x86/kernel/pci-swiotlb.c +++ b/arch/x86/kernel/pci-swiotlb.c @@ -42,10 +42,8 @@ IOMMU_INIT_FINISH(pci_swiotlb_detect_override, int __init pci_swiotlb_detect_4gb(void) { /* don't initialize swiotlb if iommu=off (no_iommu=1) */ -#ifdef CONFIG_X86_64 if (!no_iommu && max_possible_pfn > MAX_DMA32_PFN) swiotlb = 1; -#endif /* * If SME is active then swiotlb will be set to 1 so that bounce