Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2775328imu; Mon, 19 Nov 2018 06:01:34 -0800 (PST) X-Google-Smtp-Source: AJdET5fpFJywqwV0jNz6unElpO9LnjvMeLSsO4GmxGZObqOfzfKt5jfR4+1PhAjxmFTZrxVLDPag X-Received: by 2002:a63:5153:: with SMTP id r19mr20125326pgl.281.1542636094282; Mon, 19 Nov 2018 06:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542636094; cv=none; d=google.com; s=arc-20160816; b=cauo213jVmnvjdqMeL5h4YvM7DXpOmVnwCUmC4IRjK7Zix7rAhA1tKkXV6t5Y8AK3Y eiEpYQkH5xxWZTQ1g0Q381bqjp3tshg+EWoWytLL9viJbNcURt/OVLuPSsFUUFnhm6oy c1tHnmKuwl+WVllCRzVBC9Ph/AGUK0SjtuNoJpHH26B49N1tIk/D0GnYagR6t+abtXS4 UmQfixU61ci1JRYYXHSnESr+74mfZlV37PygI9wK9mZBrpqzFR1LBe53h2i7lvEDIc8v n4HBSiAjf51Qmts6dH3zB7LI0tKAqZ5s1yeOnD/OZuhDLwz1BEjKwhyxUYkLX8XVwMuP wUoA== 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=a6/RUOrjNqya5BCPry+MzaIlh3xmxbgOW7O8FQuD1rs=; b=zzQoM8tJy+CcUKYxq5rUt4dPX8nN3MtOzr0phdAtLjnCmC0UvoCc+lnM5QSJIw67+F lp4eUr3Wn4wZp9wjsX22N0MnfbjvZlEwxtLOTTqyKmRc89a2gdHA6OJ48dN+Vif0iCrv GNHQZF+1yzdEIHyYo3FGKBFezBvDxUbPY4kqyMhDen2y3qLc1qkheDdHkr+iexJFHfIj K0zBoLSSwRKPHkRrBAM7UUOD+tAkUnp50YBpZNqmT2cvErbV0m0H74Kc41zQ1xyYvYbJ X/+d+9S8ecvypNYi+g89EeaSgVsewWx2OO+QGAsH2Ig6lsLQPLFoMuLNFslIXBtZA6xX LPFA== 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 x142si39241929pgx.202.2018.11.19.06.01.17; Mon, 19 Nov 2018 06:01:34 -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 S1729426AbeKTAWg (ORCPT + 99 others); Mon, 19 Nov 2018 19:22:36 -0500 Received: from verein.lst.de ([213.95.11.211]:38215 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbeKTAWg (ORCPT ); Mon, 19 Nov 2018 19:22:36 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 6584B68B02; Mon, 19 Nov 2018 14:58:52 +0100 (CET) Date: Mon, 19 Nov 2018 14:58:52 +0100 From: Christoph Hellwig To: Palmer Dabbelt Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] arch: switch the default on ARCH_HAS_SG_CHAIN Message-ID: <20181119135852.GA16428@lst.de> References: <20181109090008.24150-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 Fri, Nov 16, 2018 at 08:52:14AM -0800, Palmer Dabbelt wrote: > As far as I can tell, it looks like m68k, mips, and powerpc mention an > IOMMU in their ports, don't set ARCH_HAS_SG_CHAIN, and with this patch set > won't set ARCH_NO_SG_CHAIN. m68k has no iommu, and not operations that operate on a scatterlist. mips has a trivial iommu driver (jazzdma), but I wrote the current instance of it, nad it is fine. powerpc has various iommu, but actually enables ARCH_HAS_SG_CHAIN unconditionally. > The issue is that I'm not sure how to > determine what constitutes a horrible legacy IOMMU, at least with respect > to not being able to use scatterlist chaining. It basically means someone is iterating using manual pointer arithmetics over a multi-element scatterlist instead of using the sg_next and for_each_sg helpers.