Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp84449imu; Mon, 19 Nov 2018 18:14:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/XjXu0fd5EvFAXn7aTSNEMX/8MOVHlYY2TD9mnl9e8ZkYTBCQZ/3mC4JdL3nuWILXEvJOoO X-Received: by 2002:a65:4ccb:: with SMTP id n11mr139624pgt.257.1542680078580; Mon, 19 Nov 2018 18:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542680078; cv=none; d=google.com; s=arc-20160816; b=hRdLIEQuHWk4lmQG0fbbcA7rUcE/nyyuNg2SxXLBKvrmev8r1Ol4Xn5jE2sCytcxO5 Rj6Qb7nt9CnAN2CBaqjVCaS0tWoIM/entW/GqLHMIWvKq/fpvzMlPOu4b+RWQVSDojqe x/b9wI1Fvbf++MYXAZvTTeiLktmqyd58iFAngsTZPo+Gh+bxWIWYN8AoqdMDcr56ICwy hjb+N/+VMwq9UZn9l5YHUpaTDkNW51hker4rGqgyYNAv+SjgkNp/iguX0DrbZBaXO5Vj zVEqw5ssnz6f/QK5le2vaq+zeLiuymPML02S+78IuOEmOx+Uj8A56tBjy0HNv/JYA22c dEcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=gyn6gFow0MKRF0ysKpduDTR/xiD6n6UxxkLJuvi/WtU=; b=vebi2TyBPNSYywPLmpE02U6qlNLJiUJEPCDvwf9+k+xHw1JsdNd/3jhNIrMh8okvDA w7vv5zfcX9hmAIgH0Hh6zqVYv1P1Ya/kihuiSR2dH0spkcWqdK2ZZ7+M37iCiwmluZ+d VKHmBy4c5R+6CTqXlibwMMy8Wcx5l12tKUL7xaAofaOPZ7fN+/Whsyh6mzCrRH/gD5jd Nkn+dMKOe1cozi64waFhYMXiWpXOpPmp/Y6u/X9T6UVb9oDb9fOc7qak1vANMLx86QFk 9mZFGdt+SwcIInkTdNITZIl/4qinTZVqsNdLeKkdtbL2bEVkPT3wCBhJQhndZD3J0RmV MeNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=jcHbIDVy; 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 20si26084074pft.177.2018.11.19.18.14.23; Mon, 19 Nov 2018 18:14:38 -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; dkim=pass header.i=@sifive.com header.s=google header.b=jcHbIDVy; 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 S1731935AbeKTLO1 (ORCPT + 99 others); Tue, 20 Nov 2018 06:14:27 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35049 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730335AbeKTLO0 (ORCPT ); Tue, 20 Nov 2018 06:14:26 -0500 Received: by mail-pl1-f196.google.com with SMTP id v1-v6so108298plo.2 for ; Mon, 19 Nov 2018 16:48:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=gyn6gFow0MKRF0ysKpduDTR/xiD6n6UxxkLJuvi/WtU=; b=jcHbIDVyMH5/sM17UChOWiyCYGg9fqrKV3+Syqz13xN5NHwzJqLmCPCCm1QaPt5Gx2 Lzx8S0bAbR2yJKfgOQb8adRUd3lnS2ZdzL7X+AXsD5MRAi1wiB0EIYpUZPfZ1Pqo8v0Z N4dqEjHE04i9/qEizB2NbEE77BDkxpXwsEWPqCdO1bYBkg7EwSelN+stgHX7CeOeZwOI VF61S5Jk7vKM1UCDAv3px3oWOeXUXkhvmQxEIwsBHgGqSC89O2pq3I31VO8ha7DBbsQ1 SRkZEBTywtzHeCcnf42ka74mbYbv1RrzB+6RVYX/B5DO5ME+Hf9j98q7JJ/JXGpNoS6q FSxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=gyn6gFow0MKRF0ysKpduDTR/xiD6n6UxxkLJuvi/WtU=; b=AsfqBWItxPadMcvOhh8RgGwFRR88LIvJlq/sczevMuHkFQHeQNn2fTxUENTnUaEPzw fYR2/3sec0hwam2IZgjN78HGYXlYoxt8pcM4ziM0aISkQXiNkK1Sd6m2+zXx7BnFQNcI tyskBQbmRlkx57bmWiJR1gdpA8c+yYoI38APhH1LXlMnf1UqWuZaof+gIl5/R7vTab2G RcCJTGYuo3zA3janCOi2hYRFu4XiY7O4OZG99i1em1uIZQJSLtHvsxy4gVMJWk9HZv0r UyJ2fzqZWUX9nDxsKISIdWUoO06gaCdgozlkNCYyMkhRzfyfsYOqYK2I8O9H2bGYmP7z Q1jA== X-Gm-Message-State: AA+aEWaNhrf91Yn0rm+8fg48UA9AOSneLUpJuHPv700qvL99qCYsGY6i YmRhrRcEKk3bwDMK/6Wh0xk4Yg== X-Received: by 2002:a17:902:33c2:: with SMTP id b60mr4738641plc.211.1542674883440; Mon, 19 Nov 2018 16:48:03 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id y29sm48936484pga.59.2018.11.19.16.48.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 16:48:02 -0800 (PST) Date: Mon, 19 Nov 2018 16:48:02 -0800 (PST) X-Google-Original-Date: Mon, 19 Nov 2018 15:54:02 PST (-0800) Subject: Re: [PATCH 2/2] arch: switch the default on ARCH_HAS_SG_CHAIN In-Reply-To: <20181119135852.GA16428@lst.de> CC: Christoph Hellwig , iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org From: Palmer Dabbelt To: Christoph Hellwig Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 19 Nov 2018 05:58:52 PST (-0800), Christoph Hellwig wrote: > 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. Ah, OK. In that case, feel free to drop a Reviewed-by: Palmer Dabbelt in there, if you think it helps any. Thanks for the help!