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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 91344C5DF60 for ; Thu, 7 Nov 2019 15:07:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D12A207FA for ; Thu, 7 Nov 2019 15:07:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388022AbfKGPHI (ORCPT ); Thu, 7 Nov 2019 10:07:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:55312 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726810AbfKGPHI (ORCPT ); Thu, 7 Nov 2019 10:07:08 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ED301B24F; Thu, 7 Nov 2019 15:07:06 +0000 (UTC) From: Nicolas Saenz Julienne To: rubini@gnudd.com, hch@infradead.org, linux-kernel@vger.kernel.org Cc: Nicolas Saenz Julienne , "H. Peter Anvin" , Robin Murphy , linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH v3 0/2] x86: Get rid of custom DMA functions Date: Thu, 7 Nov 2019 16:06:43 +0100 Message-Id: <20191107150646.13485-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org sta2x11 is the only x86 device that depends custom DMA direct functions. It turns out it can be made standard by carefully setting the device's DMA masks and offset. Originally only patch #2 was sent but I realised patch #1 is also needed, which is a good addition as it's also a prerequisite to get proper DMA support on the Raspberry Pi 4[1]. [1] https://lkml.org/lkml/2019/10/15/523 --- Changes since v2: - cleanup dma-direct.h Changes since v1: - Small cleanups in sta2x11-fixup.x - add patch checking DMA addresses lower bounds Nicolas Saenz Julienne (2): dma-direct: check for overflows on 32 bit DMA addresses x86/PCI: sta2x11: use default DMA address translation arch/x86/Kconfig | 1 - arch/x86/include/asm/device.h | 3 - arch/x86/include/asm/dma-direct.h | 9 -- arch/x86/pci/sta2x11-fixup.c | 135 ++++++------------------------ include/linux/dma-direct.h | 12 ++- 5 files changed, 36 insertions(+), 124 deletions(-) delete mode 100644 arch/x86/include/asm/dma-direct.h -- 2.23.0