Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4151305imm; Mon, 30 Jul 2018 09:28:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcM8q5TF4Rqy8hYe1FwAVu2ut1ky6OIkUBq60AlGwhMXfKevD3d5aYfvvMEsmoWOzXL13bc X-Received: by 2002:a63:a543:: with SMTP id r3-v6mr17030423pgu.336.1532968114015; Mon, 30 Jul 2018 09:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532968113; cv=none; d=google.com; s=arc-20160816; b=FZlvCFqoQDgyx+wxGDyWIyi+hsIBlP7CR5EhMri98DK2AtWVaT68dl1ME8l3dMjX+1 LlDXDHGqU3+M3iTdAuEhnSejt3pI7RU+lK/HY6mp6oeTkak8k4wHie0u7Yg9zysh+RqA sHkANOV2UNspt9ZzkM1mNoeL2Y/dc/KppyZJS3shOmrW6t2Cp/rF9S5klogi2O6nezAN mMBRy9gFB8cvAnUPDfXKd916VZr7s7kAF4JLG8azUs3zXRmDspkU0cj4NG8NSF+JzJGk MQKIghYMbCZHgv66om5dD/zxfz98l4maRxDMn+EH+dAlevT019QnqjHHhNd3iTy3oNZF l6kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=TofKbyL8IsOLKPOyyJXZC6HHqbaWh5dRVb3Uno2Napo=; b=nwMbi/VZ/KzNPjqZ3HyyjGP7OJXK6cK4IMvcgfyVIMK0+9zimg1/CCLATmvU94JJj4 2EmqUM/+kpcWXdSlHOsCOO7uy4zaZGP5buezIZYJ68Cy6rSHP8HLnLangknQ30FF6OeW 2EVil0O+LRRjjSeF4HiDjSZwhHWxGJxltqhjAeD5uQqhqp2k2mVqiXmun3pm/gqtQhgX iOiAq5eLZHTKc1tgiSDCTZL/QpzJH/6+FBnHkEkL9uEwBGlBFADxMAOHb7DVnftj6IrA /Cpn0zh4N4DUyYq7aHqk9uc9YEb8sVg6tOWxHWCZA5Mudepyuszk3OfEv3BJAXD8iul1 35nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=l4CcOPo7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n28-v6si11525291pfg.127.2018.07.30.09.28.20; Mon, 30 Jul 2018 09:28:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=l4CcOPo7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731981AbeG3SCc (ORCPT + 99 others); Mon, 30 Jul 2018 14:02:32 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:43641 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeG3SCc (ORCPT ); Mon, 30 Jul 2018 14:02:32 -0400 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 Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Vineet Gupta , Alexey Brodkin , hch@lst.de, Eugeniy Paltsev 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(); -- 2.14.4