Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp367051ybt; Fri, 26 Jun 2020 01:09:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt7b4gdrnpyNVsOztTUJ5XbGk0QwZaEbfSLBPpXuxiP8afWrP+UH13kDGlnj7Lkl+4453K X-Received: by 2002:a17:906:c14f:: with SMTP id dp15mr1511976ejc.454.1593158969151; Fri, 26 Jun 2020 01:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593158969; cv=none; d=google.com; s=arc-20160816; b=x8hpocVdmXyvkdr9tCk18Uu28xiiePdlrUXZvVRS9TI6+ywqFES1BUaASQnJYyAj8p X4AOtK4xbTExWhFcztp8IcB/EaFfftHrgmSbV5ZljZPvrrhKM8GQ8Z0CgseZEq+iR0Jn KWb2TwWD2y4XWRX8S3/Cg9h2xsuEEILJ8365dZ6pQ9vtB0LwCBqIeUZMto5a+Br5o12J 5YUiFqx0c8xhpfvVUKYQoWFbGK0pMuul4UUiYv8yjXTHYUEFNIZ05VlxEVR3ixWKxcS+ GqsFnVTq6h4ESe4u2gvHP/NjdxtVxlFQD61q9rYdSdAtH7UYrsEQxAvluj0yNzAZZGj8 uKVQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vxsAwsLR9Ng86EmjXAj4oPak8ui2caJnN1kRrf8YMkM=; b=OF/4qh1gOkb4yEyw/tGHTC35tu742eaWIFyqWHYJ/c6l8niYajl8O6SfJNn1mSpW3w 3p5muxTyN66Bq8zakDPe7KVmuxd2pZWKbfCySBNqr5RLzdUXVGxwR1ThxtHLY4CSDsi7 Adl0Scjktqvi2dmaB9NWPzmPtsiX0T2TL6MGVV4mbmd5hRFQ5OCH9fc1c1vm1rDRveqK yTy/4+RVA2ax1Z5pSrGzFtvQp2VScpPm+VO+8NjtcLk5pxqlXHQRTMqkJwu+WxuQEyv8 S0KC9clzwRLTICYnFE9Cg95yeNAUNbCSOvYQO2Hpq+Enl/k4j2+n9CRxqOPfp74RQKmk 07jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=cFpcU+eH; 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 ot18si7941243ejb.303.2020.06.26.01.09.06; Fri, 26 Jun 2020 01:09:29 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=cFpcU+eH; 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 S1729510AbgFZIIA (ORCPT + 99 others); Fri, 26 Jun 2020 04:08:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729469AbgFZIHs (ORCPT ); Fri, 26 Jun 2020 04:07:48 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A05AC08C5DC; Fri, 26 Jun 2020 01:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=vxsAwsLR9Ng86EmjXAj4oPak8ui2caJnN1kRrf8YMkM=; b=cFpcU+eHvnSM2qCuf91vLIb1Fx anoFL9E4Vkd4hPwyWej6Afg1YiVZBWGhJrCPpGFIFVJSz4Q76ngAPy12orssjbJNMIats6RsFgXpb 8iYqGq5xKN/Bh3VFiiYO7+VOFqGPFQXVMymKDP53RHfzHWYomigNsZIAlVeV3Pkp+S14UlDdN/VqL dkXjnEH95K1XlDfoSJGUIJ9O5H7NC8nXNyImcRPqndQXLuDuZ1dp82U3W/Nl7RSdBNlDISrgxPFy2 wzWHFwQN5Tr4ola8eMjfzQCnEB9ZXIJcBW3yRHC95SnG/2CUpZjtx8YZmPukLOsaa0Rdf/XojpV1k qZ8cwtIw==; Received: from [2001:4bb8:184:76e3:2b32:1123:bea8:6121] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jojOS-0007tv-TH; Fri, 26 Jun 2020 08:07:29 +0000 From: Christoph Hellwig To: Yoshinori Sato , Rich Felker Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/10] sh: don't allow non-coherent DMA for NOMMU Date: Fri, 26 Jun 2020 10:07:16 +0200 Message-Id: <20200626080717.1999041-10-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200626080717.1999041-1-hch@lst.de> References: <20200626080717.1999041-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 config DMA_NONCOHERENT - def_bool !DMA_COHERENT + def_bool !NO_DMA && !DMA_COHERENT select ARCH_HAS_SYNC_DMA_FOR_DEVICE config PGTABLE_LEVELS -- 2.26.2