Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6792301imm; Tue, 24 Jul 2018 03:11:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdO6hzsQyz+MpNpnIXnCE3XlyipkQxvzUO+RpKsFP/pthF4NRgHKcRXNxk7WGxGNpFgDXqN X-Received: by 2002:a62:3d41:: with SMTP id k62-v6mr17081349pfa.35.1532427108703; Tue, 24 Jul 2018 03:11:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532427108; cv=none; d=google.com; s=arc-20160816; b=HjqgAuanDH2XTiq0g61ixROB49lG5jiQhoFD6N56IfONjPsrxe7b4wStDBdkF7UY+9 s7qpVRxRvGtQY/JmQCiQCXHBXj10lULgB1HfDzbaykdFqOzyBloMCRndWxnDUtGh3cUm 1ybBJspZ+K2W9+yQeJLi/ahQlV3AHxQrGb3ofb+mMcTAq8ICRG+M3q6tpU2qfX2TuSfb QOmg4uMdKkyin6wCkIrF8usU26WVy1o33BKLrQYe0zfxp1kYzGBhpHQeKDMr+LLns7Wc zEsLy4dNfViXel5RYRhV+VCwfsE5CdeF4cYptrCy6enKYOiJAsEI1cPT6IIQQNzWDXeX mj5A== 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=kY5EGn/WIrQfTk/4CGiMAkNQ998yHF0j+l+6wI3u6Ws=; b=x3BFFfiShotAXP5EacH6He30A19beztiRq2RjKILaS+eEdWBUo3dT/vZmiyE3dt8Iu wUnrM24a8AUS5Y+tzEfiw9HBcpbew2NhO8rU23c94tG5bbJjNRQo+xPR75y+rDzG0NFM 92XaTLixzR5Rcw/fAxFgj2PlBRTmJXirXvbJhzI9rrupm3qg65Tvqo0lBS9szEWd24Eh dFjlz2xsnn4Hjqrb11Cwa0tnscemq1F1ELa5bj5+TAMxhYhvTCyP7Aio8rTXS7n01ILZ PI+tA4kbTHSd4dIeFNyiH8MtHO2b7TRlhnyTnTY6bTN2lNbR1PirOd1wAt7nShgn2JLC 44lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=MElidWRs; 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 u12-v6si5300749pgh.261.2018.07.24.03.11.34; Tue, 24 Jul 2018 03:11:48 -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=MElidWRs; 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 S2388526AbeGXLQ2 (ORCPT + 99 others); Tue, 24 Jul 2018 07:16:28 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:42396 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388251AbeGXLQ1 (ORCPT ); Tue, 24 Jul 2018 07:16:27 -0400 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 Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Vineet Gupta , Alexey Brodkin , hch@lst.de, Eugeniy Paltsev 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(); -- 2.14.4