Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp875145pxa; Thu, 27 Aug 2020 19:16:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEnfPrgZYBwrQATkRxuDW6FI1XEUwAxuSpkEvRmBcicgqgGbe3uRy+7ZWtqmmx4XB6HKwt X-Received: by 2002:a17:906:da19:: with SMTP id fi25mr23497759ejb.405.1598580960380; Thu, 27 Aug 2020 19:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598580960; cv=none; d=google.com; s=arc-20160816; b=O9v2l6glS/tm2Jg3ksWvraxHZXGgJoQvEzEJ6/eiBQWqEiIH+KhpeqfDgaRsnGLzg1 92UHZVpD2o5eHnbc3hK94iWyFS9HSAgy8vjoXfO/puHcW/+VN7YgJ9ELowUMvkwF637C TBaVgBesu/xq0jGOc98Fixm/BwlI5Q19h/R4/t+k5/us0bymPIFYQ/enXV8i2gVhDFUZ 7P2dhBXCkFNnWA2lpAa6UrJidzodQz2k3RIS6stLXnYGtcIX7UDT77cj69AdvUeTaxWs bEPvdt92qLsal5+5IbgRpomofp3xeVxqLrc+eqkfBkvd7d32qqHynpGaTYEfa7+cyiWB RQPw== 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=LYuvuAutVZOya04+1JVJgKs/t6+hMeI8dxwPjkPJ7UM=; b=jNwNzjXB0ZM4hyi2JHRaf1RL9P/00EruXRXaaBkhtvtbYHekyVfEbh8X6cD5934Vm0 4TBxxjhfNfEj9hMSsLOZZrjPlHLlQZrEE2kB14Gf3I7OXgZzRo07mnEJMNHZ/WHU5tBf YFY3c6XLeFEzqVt9GRSDQTkHQq+eJk51UEuMrAlToACXLro0KN5Xxuf4z0dy6cT55oSK 4JeCa/LgXU4XcwmCW3XwJ2q6dyYywl8/JkfbMte8NsIeUti9gWdquB84/oOSVgAXiHYx kbaml0scJExDd7izhpBWSoqriE5sh3Q3/P/xb3WUVGvwrXYUr2Lah5diyARu4lWt05GT ev+w== ARC-Authentication-Results: i=1; mx.google.com; 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 n16si2635908ejz.302.2020.08.27.19.15.38; Thu, 27 Aug 2020 19:16:00 -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; 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 S1728182AbgH1CLy (ORCPT + 99 others); Thu, 27 Aug 2020 22:11:54 -0400 Received: from brightrain.aerifal.cx ([216.12.86.13]:47544 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbgH1CLy (ORCPT ); Thu, 27 Aug 2020 22:11:54 -0400 Date: Thu, 27 Aug 2020 22:11:53 -0400 From: Rich Felker To: Christoph Hellwig Cc: Yoshinori Sato , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/10] sh: don't allow non-coherent DMA for NOMMU Message-ID: <20200828021152.GU3265@brightrain.aerifal.cx> References: <20200714121856.955680-1-hch@lst.de> <20200714121856.955680-10-hch@lst.de> <20200828020045.GT3265@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200828020045.GT3265@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 10:00:48PM -0400, Rich Felker wrote: > On Tue, Jul 14, 2020 at 02:18:55PM +0200, 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. > > > > Signed-off-by: Christoph Hellwig > > --- > > arch/sh/Kconfig | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig > > index f8027eee08edae..337eb496c45a0a 100644 > > --- a/arch/sh/Kconfig > > +++ b/arch/sh/Kconfig > > @@ -61,6 +61,7 @@ config SUPERH > > select MAY_HAVE_SPARSE_IRQ > > select MODULES_USE_ELF_RELA > > select NEED_SG_DMA_LENGTH > > + select NO_DMA if !MMU && !DMA_COHERENT > > select NO_GENERIC_PCI_IOPORT_MAP if PCI > > select OLD_SIGACTION > > select OLD_SIGSUSPEND > > @@ -135,7 +136,7 @@ config DMA_COHERENT > > bool > > This change broke SD card support on J2 because MMC_SPI spuriously > depends on HAS_DMA. It looks like it can be fixed just by removing > that dependency from drivers/mmc/host/Kconfig. It can't. mmp_spi_probe fails with ENOMEM, probably due to trying to do some DMA setup thing that's not going to be needed if the underlying SPI device doesn't support/use DMA. Rich