Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp503418imu; Thu, 3 Jan 2019 01:53:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN6NLouz1xLiduAPGOncncqBDE6RWhBT3XZkHI15lr45TLwrWVORzFwOIwraJvFvz9F4p0q9 X-Received: by 2002:a63:6506:: with SMTP id z6mr16349540pgb.334.1546509211580; Thu, 03 Jan 2019 01:53:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546509211; cv=none; d=google.com; s=arc-20160816; b=kUZFCNPH9Dg4YLCJ7ewf9W9CJQ/sTqpBf+tuEzhGXCQI6LYo+CDTONzwb72JYsWfxp e6ufkmVIT1dz46IMJN+AMMcTOO/8NYQDj24sGhDbbdSEtk6POLQxmxp1uoH152jIln11 rQJuYbUDYSi37ZU4uxqsTsF+hkj4LVo/sX4QhJY6hDipTz9ifdrLNS2VzWH1bUm368k6 CrXeXC62oHQKqnpKYaW+sB+H1ds0IAFhr3rb7XoFSX0E7bdVilVxs0KxUJN8Y/uEkzuJ t7bnvTmYRUeytvcbWCx7hSk0SuPxfE8eXYK2mnJH2nV+dkzkLubDr0Tv4++KmI1Alz7Q /NqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/Ha2eEH90GuclAeuJo9i9CcQleEP5miLwVrKQPG6ewI=; b=yexj6wwerHezNMU8MOTm+Vbm25Klu+XUFPO82G3/FZGJQqJL0d2fFPaEfwyi67xE0V qVWn5Nf5Gchi9KjQOVOVan7YJsMvXBpIjj7LrEBl3WNqkR04hnRAfW+h1uu/HvAuvjQd FbJk1N+K+jM9FSwGER74OcyeOv7jvMPo02svMGMNieZKmV0jgh3us+Tf6JWy5MgYS1rT C2ZDufOgTB3bk3SVyLfuCaSMsguMQUI6lpkXct5OGVoaRRMc+u82DLGvH8ZIMHRGq02x doDu0apuBRGa0s6E/1AMiAOJj3a1MIve1i4rHYBGzn5kcZJKhspVuMc3CsGeNxJVeP1O LsqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i189si16331858pfg.265.2019.01.03.01.53.16; Thu, 03 Jan 2019 01:53:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729932AbfACHX7 (ORCPT + 99 others); Thu, 3 Jan 2019 02:23:59 -0500 Received: from verein.lst.de ([213.95.11.211]:60755 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728613AbfACHX6 (ORCPT ); Thu, 3 Jan 2019 02:23:58 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 58BE667357; Thu, 3 Jan 2019 08:23:56 +0100 (CET) Date: Thu, 3 Jan 2019 08:23:56 +0100 From: Christoph Hellwig To: Tony Luck Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Linus Torvalds , Jesper Dangaard Brouer , Tariq Toukan , Ilias Apalodimas , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Robin Murphy , Konrad Rzeszutek Wilk , Fenghua Yu , Marek Szyprowski , Keith Busch , Jonathan Derrick , linux-pci@vger.kernel.org, "linux-ia64@vger.kernel.org" , X86-ML , Linux Kernel Mailing List Subject: Re: [PATCH 02/15] swiotlb: remove dma_mark_clean Message-ID: <20190103072356.GA24163@lst.de> References: <20181207190720.18517-1-hch@lst.de> <20181207190720.18517-3-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 02, 2019 at 01:53:33PM -0800, Tony Luck wrote: > On Fri, Dec 7, 2018 at 11:08 AM Christoph Hellwig wrote: > > > > Instead of providing a special dma_mark_clean hook just for ia64, switch > > ia64 to use the normal arch_sync_dma_for_cpu hooks instead. > > > > This means that we now also set the PG_arch_1 bit for pages in the > > swiotlb buffer, which isn't stricly needed as we will never execute code > > out of the swiotlb buffer, but otherwise harmless. > > ia64 build based on arch/ia64/configs/zx1_defconfig now fails with undefined > symbols arch_dma_alloc and arch_dma_free (used by kernel/dma/direct.c). > > This config doesn't define CONFIG_SWIOTLB, so we don't get the > benefit of the routines in arch/ia64/kernel/dma-mapping.c I think something like the patch below should fix it: diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index ccd56f5df8cd..8d7396bd1790 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -31,7 +31,7 @@ config IA64 select HAVE_MEMBLOCK_NODE_MAP select HAVE_VIRT_CPU_ACCOUNTING select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB - select ARCH_HAS_SYNC_DMA_FOR_CPU + select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB select VIRT_TO_BUS select ARCH_DISCARD_MEMBLOCK select GENERIC_IRQ_PROBE