From patchwork Tue Jul 24 10:10:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 948335 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="hD8hQNrk"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="MElidWRs"; 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 41ZYz95XDsz9ryt for ; Tue, 24 Jul 2018 20:11:01 +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=U4koSTuyWOz31Ka6qiR61FYNsuP7gSOJ+KQLFjzBPU4=; b=hD8hQNrk+IwYDKA84WkVuPid7a sxb1mmgFjlLg3OpsADboGcJK8YJjrpZKwOWJQJpuFW/SMKgJdsS6GYtIWOUUz9v/m52uzNqApe0kh 3aiDc+JqTpSNJStLQTTRTXRF4panhAQ9WCtWEgTbvLGRRqPWDN2vRGjXn6ft1C+YIkmFVcbxooFw8 s8U+YJdjCBZYy/xuoBQH0h7eSLCsMFwLjq1U+5LGw8jIVdYoEv4uQ9R+4z1meWFievzFwPgJWu96B UwPrMqRMU7Gvaz2kipcaW5QSW4No2qcbZHjH57BMMZ+7cqqi+sve6NQMBwpNayXiwvx7rLMrmSa0D WlsX9OAA==; 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 1fhuHT-0003PE-4h; Tue, 24 Jul 2018 10:10:59 +0000 Received: from smtprelay4.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhuHQ-0003Jo-4X for linux-snps-arc@lists.infradead.org; Tue, 24 Jul 2018 10:10:57 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 4697724E0749; Tue, 24 Jul 2018 03:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1532427044; bh=USTCJUDFbwY5/curXeDwo9o/IGl4dzncWcHCc0L2ltc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MElidWRs1vYMD8fsuffmo+cAMKnQkaojcZCwPHYh0Hofq9P/8eGdM6o2e1809QuoT ibLBCI7Kj4DGXKcmAmyIj57jwqCdpwGpCNHDQnXQYIISuAm4cTY4oYQnp6f/7YtzzV /tsQPeYvtqeqQgnESuFZe7r2BozSF4nqEqQ0oTX6dryVHq6n2PPxk5FAv/4pv0dQiS M9Q//n8TKlsCVxQThGRAlVL/I7gNYtnV+/gbnl97GuMVbz3XegIGa2pnBZpfTVKcF+ 96v9UM4TI83bpDTeT8rlR47+P2nLbs4GRoMjO/tJEDJRVw/OcERbV+W2G+e56GNAT/ Hwbln7YAZqWxw== Received: from paltsev-e7480.internal.synopsys.com (unknown [10.121.8.86]) by mailhost.synopsys.com (Postfix) with ESMTP id 70D36339F; Tue, 24 Jul 2018 03:10:42 -0700 (PDT) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org Subject: [PATCH 4/4] ARC: IOC: panic if both IOC and ZONE_HIGHMEM enabled Date: Tue, 24 Jul 2018 13:10:01 +0300 Message-Id: <20180724101001.31965-5-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180724101001.31965-1-Eugeniy.Paltsev@synopsys.com> References: <20180724101001.31965-1-Eugeniy.Paltsev@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_031056_180900_410C9983 X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. 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_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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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 --- 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 34935ce38631..e0b3484641c3 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();