Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1713043ybt; Sat, 27 Jun 2020 17:56:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHLUhGwGrw7Iux6go6JfcIXPtmmQUOJ4ilndTZGJnovbowFM9hJFhjs8WhXSTpZaUmLUf3 X-Received: by 2002:a17:906:da19:: with SMTP id fi25mr8287802ejb.369.1593305811253; Sat, 27 Jun 2020 17:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593305811; cv=none; d=google.com; s=arc-20160816; b=I2Fuw1mgrQGRMUyXKoG8hXNWQLJ/5emyWWmh1xeZqKck5VC3QPShycs9k9z5a8UQyj 0V5c45DefPSjgDAg0w0Q+MqJd3l2/q63+Dd3tgBpcexg546WYnDagvWpSLbO6jnfEqEz PWnUVcgqAoZk6QJEkTltN12SF0ttwV2LMPDFt8eCsa517YNyj3kbjtpFZJTe8g2ue60r 7wQwZaKmAaSRYGqvEV2oQkTfPXbwzmuy8qSd9eD7AXPnE8nV4XaSDjrLK5MNfkqfcnoL NxDMIyTO+A9xNCngEZ7HWwSKCU2TWg1kecwo6eSpHQanql8qMYymXGwizcFgk0Fm05nF 90bg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=nsJk0nfkSz2k8aqVeyIdgKyPII2GCP1n1XDCy7YehbI=; b=V84UmI6tODfLt7z62MwaUFsWrODkXVWdYdwo8vMmqL99CpamWrjsopjv7R+MZW0WKe 7iL+O0d9+k8+88M78CW9wcoPm9cmeFdearHAWXyG/t3o9vSR/tdgbePI7OGZ5WYVp3ZY t2JeOv6FKeryQGuA9f8TuqKfzdxe9OL0w9n3ZKhPtf21F0DaZOaypfjTS4lyGoamsQtj d1HXNYRo+QRqp37HSJBX3uDTk4qPAZJS1HBIMSOxcw/1xylfTxAAoK1iO2bNhGtYpYhi jUU2fNky2NzQdNXjNcwmAtufppFvND+ksiuysEIdzmupiLGgQoqTn6h8tD6S5RGQlLrG hItQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=F5wASf8F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz14si14190743ejb.65.2020.06.27.17.56.28; Sat, 27 Jun 2020 17:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=F5wASf8F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726819AbgF1Axt (ORCPT + 99 others); Sat, 27 Jun 2020 20:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726378AbgF1Axs (ORCPT ); Sat, 27 Jun 2020 20:53:48 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C519FC03E979 for ; Sat, 27 Jun 2020 17:53:48 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id n6so12242681otl.0 for ; Sat, 27 Jun 2020 17:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nsJk0nfkSz2k8aqVeyIdgKyPII2GCP1n1XDCy7YehbI=; b=F5wASf8Fri/sqqZ7S2mvoeuV0cp88s2puvIaVhgk9pu0s3AK85cOQNvQmuJFXIXbP0 K5O0fqTjeahCeeR4H5+T8jsxwb9p45cXU4aPr58kx3XQr0xPZfF0VGCTCRb4XXKXYzHG fTn9dh/vejm9BxHLOygA1x9Ij9n1HqRbvbjyHcNJ7l7tVJnj91fp5IQOwWtatuViqJn1 jlQv/3C20RVn7epNlE4V/jRuilY8ncA9VhUwahS6YW7s0cm6CGLafzuTNc8N9GQwMA2D 79GJTsnSiE2fMqtSVkfzse8n4EY1ATIwlNMXzf5a1RBLzxpBEL68NexetNvHfFTEUh3n 0rmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nsJk0nfkSz2k8aqVeyIdgKyPII2GCP1n1XDCy7YehbI=; b=KdHaD6X5BrqLN9Tzj2/jovuTNxQRjCjdFRjaZU6HpJmmRZmFzocjcoV2ZgOjzcIuOw SIXDVZ95i2igwdNU+UBtPaQ5s3hoPOZY5IMw+IcJhXYUb+lTUB9oLZIktoJjUNYb5v/u 5c70OpzQ+TnRqFY5d8lkdS+VYx4xTJu5COoOUs4beo96wYp0aK2F3nuR2d36uYFVAwy6 2nwHEYkVtEJPsJq2h+Qzp77esuqMh2/Rvk1G/cM9ySxZRC3OQvHRAIJ+swVKvLuKJd2x ei8v0TfLnUcMfjGmwaQ3e1GCBQfidnR9CUpxjlt4vvIZ6/S+73l6nhnwgewdnroTIy/G Qf+A== X-Gm-Message-State: AOAM530Ik1LRg6EKGcTSDaEPItoyJ3jh7oaNADlMPTu9IxASknJfgbgg 0c2doYIz/AyapcwDXkXj0UFcy/1GGYM= X-Received: by 2002:a9d:6e8a:: with SMTP id a10mr8226679otr.220.1593305628000; Sat, 27 Jun 2020 17:53:48 -0700 (PDT) Received: from [192.168.86.21] ([136.62.4.88]) by smtp.gmail.com with ESMTPSA id 62sm1639011ooa.25.2020.06.27.17.53.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Jun 2020 17:53:47 -0700 (PDT) Subject: Re: [PATCH 09/10] sh: don't allow non-coherent DMA for NOMMU To: Christoph Hellwig , Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200626080717.1999041-1-hch@lst.de> <20200626080717.1999041-10-hch@lst.de> From: Rob Landley Message-ID: Date: Sat, 27 Jun 2020 20:01:17 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200626080717.1999041-10-hch@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/26/20 3:07 AM, Christoph Hellwig wrote: > The code handling non-coherent DMA depends on being able to remap code > as non-cached. But that can't be done without an MMU, so using this > option on NOMMU builds is broken. I'm working on a nommu j-core board that's doing DMA behind the OS's back at the moment, which I have a todo item to teach the kernel about. The DMA does not go through the cache, there's currently a cache flush before looking at the result instead. How should this be wired up after your patch? Rob