Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1715303ybh; Tue, 14 Jul 2020 05:35:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvxhXaAx7fJRFZl2H+RHumYfP1rqco4dHH2nqerLyrm2IVsjWHLGCViKz8U6lh8VrFfG6S X-Received: by 2002:aa7:da46:: with SMTP id w6mr4435199eds.261.1594730140149; Tue, 14 Jul 2020 05:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594730140; cv=none; d=google.com; s=arc-20160816; b=kgFPYjlMBQLZfQidgLlTtwnM0ATXopJjXNef7EfroVSO/mcimco1CKR3J3iPo+hdsr wwbBJ6qtLgM43FBh2/wTmjQ9SlHX95P7vu74HQ/dW7fQnIHKImfvIQsMjw3cZgfCYsO1 4pq/Yripe+h1akpq3j7R2HGnhlNiymBLFaLDHdA6gbQ3iKHI00RKZ915o+1BoumbSu10 ws/l9WLHcDyDtB/3gXWVolDawoVdg5wH/v8/9pElxqz/xyi72iDgJgwylXcWA/pfkh0n EeWbxvlK+/MbFQQwGbvo9vWZ2KXdKn4kHrEn0pV1P8V1ts+cEj5Fie5dZdDstoP9DLba wVAw== 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=BI3HYC5WkufalE4DNjf64RsBYT+ejXxF2CKJ5j+0SeJGbnhKeC0bTCTj3qOYlN/MBY 6pFSwJSdYycNSKGuPTxbVgH526kZC7CF9d3EvcP4SexbK8D+F7+8yi/Rq3ajdaPYBIdT tL3BbSE997dvfekEJrGAN4JF4S+AoyiNQ3qF5sSnJLEP9Ixxu/4ew5pFK24URm2GVx// 8gScqX55z93OY992mH8+1gQa4wCoCgiAXdJhmwDSuYePaPnrJ+B5eNrbt/waTYADBom8 vNp26//ZF+zwQGhjTQzBpL7ifMobvqEWksfvVuBxBkMWkcbCpNk0CuV3MuZXllc3YG2V JiXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=TxkUt0fv; 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 l23si11144055ejq.14.2020.07.14.05.35.17; Tue, 14 Jul 2020 05:35:40 -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=TxkUt0fv; 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 S1728275AbgGNMcT (ORCPT + 99 others); Tue, 14 Jul 2020 08:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728268AbgGNMcR (ORCPT ); Tue, 14 Jul 2020 08:32:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 495D5C061794; Tue, 14 Jul 2020 05:32:17 -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=TxkUt0fvN0cBumf0X2G+oxwUHh T4zUaBfi1LUwv/EGkZGTwqindXnCsG5Ts0euiKipOmc8n7xpOOEcPc+yenI7tnRlKnPd8LDl0M1+u CDuvAhCcAoo3kyyPv1DvaFYIliQWqOqOg7LwkaiYibyysWBZYp2GoSWBOjTmlb8Sqr7Rp2WvROPRV AsSgaXmKgsjAatiU4NwKiCpNGi3Hjc3jKMvrd7BQFZ/EfVGdwr+0OOsijxcHOjfZFF1ANgSaBoUc2 FYguOYVH+NC2nEQ8kug9B08Qf27u67U4koktmXJHT6nso7dXraerlCrrhY9dcW9i7eFAeLMq2iDGS 2gyIsBvA==; Received: from [2001:4bb8:188:5f50:c70:4a89:bc61:2] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvK6W-00026a-3l; Tue, 14 Jul 2020 12:32:12 +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: Tue, 14 Jul 2020 14:18:55 +0200 Message-Id: <20200714121856.955680-10-hch@lst.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200714121856.955680-1-hch@lst.de> References: <20200714121856.955680-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