From patchwork Mon Jul 30 16:26:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 951138 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OSWwhVLD"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="l4CcOPo7"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41fQ2G5Tqpz9ryt for ; Tue, 31 Jul 2018 02:27:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=nRiNLOVYXc/LfsWj3J706E3/nFYsSmCGZ+/ZQcyTfho=; b=OSWwhVLDcjzb/yOypVROYDkGoz oq/1Soj3h5xwrVHtE6iSzG7qPUPcUHfX25ch7NTfzuIrs3yZIyF7tM2pGWrepGOFEfSHH3qkGXC1j B1bCQTo+tg2f95Gd0EwYW8xOASQtp7OZuGQ3AGfIV+FcDHAfNeTCRcaUDQbnXWlj83VdAczzxS9Nw vOCsWFG4pVqJE/1JE2X3Yy4ovqJFQeX58qj4Rc4hR1RCNfp9Bc9xfffxsCEiALYbufaEobkhI17HI leB6h0Skz3p/EHm1561DWZUemfS4TQB+PXxIzMcGXy65CYOUs5uDp4+lyFJXFXOJinKq6741y8Bct nUX/0b2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkB0e-0001wT-A3; Mon, 30 Jul 2018 16:27:00 +0000 Received: from smtprelay.synopsys.com ([198.182.47.9]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkB0W-0001cS-KU for linux-snps-arc@lists.infradead.org; Mon, 30 Jul 2018 16:26:56 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 1A36B24E058D; Mon, 30 Jul 2018 09:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1532968008; bh=ZJvL218cX4y5CWXvtZBhsSD7wmVUVLGyhAc4BivuFhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l4CcOPo7or7wO5XaeQiliBlEM9sA5dpIqHj1Lu1laPwwIl5Vh7ASLYZARVPF0F3Ig CXGdVtZxd9VJDujI23GQfYXT3k7Zk7k7YvVGaglNNnQapo2JGylqRK7kNwpdGs6ggl dLYM9QL8QnS3AU3gJnds28AFl6WyZF7NeJzpbwFGQCzaDVUKNwCvI95oAkbKxiisz8 L+HVmFIChtOwNFHlXWZLT6K4HfcLYFL9u5RlUsusNLUflTDA92pzfEHqHB6m4X+IgD E4My9qM+t8nlzU0NuRY2+xDTEKJSEMOYo7o6eamNq5rK1/o217keuZMmxKoT9AQ0dO JQfkhh6kYQ71g== Received: from paltsev-e7480.internal.synopsys.com (unknown [10.121.8.86]) by mailhost.synopsys.com (Postfix) with ESMTP id 3E2D53FA6; Mon, 30 Jul 2018 09:26:46 -0700 (PDT) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Subject: [PATCH v2 3/4] ARC: IOC: panic if both IOC and ZONE_HIGHMEM enabled Date: Mon, 30 Jul 2018 19:26:35 +0300 Message-Id: <20180730162636.3556-4-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180730162636.3556-1-Eugeniy.Paltsev@synopsys.com> References: <20180730162636.3556-1-Eugeniy.Paltsev@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180730_092652_784805_D4698935 X-CRM114-Status: GOOD ( 11.05 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Vineet Gupta , Alexey Brodkin , linux-kernel@vger.kernel.org, Eugeniy Paltsev , hch@lst.de MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Eugeniy Paltsev --- Changes v1->v2: * None. arch/arc/mm/cache.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c index dac12afbb93a..389602cf1594 100644 --- a/arch/arc/mm/cache.c +++ b/arch/arc/mm/cache.c @@ -1143,6 +1143,19 @@ noinline void __init arc_ioc_setup(void) { unsigned int ioc_base, mem_sz; + /* + * As for today we don't support both IOC and ZONE_HIGHMEM enabled + * simultaneously. This happens because as of today IOC aperture covers + * only ZONE_NORMAL (low mem) and any dma transactions outside this + * region won't be HW coherent. + * If we want to use both IOC and ZONE_HIGHMEM we can use + * bounce_buffer to handle dma transactions to HIGHMEM. + * Also it is possible to modify dma_direct cache ops or increase IOC + * aperture size if we are planning to use HIGHMEM without PAE. + */ + if (IS_ENABLED(CONFIG_HIGHMEM)) + panic("IOC and HIGHMEM can't be used simultaneously"); + /* Flush + invalidate + disable L1 dcache */ __dc_disable();