Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp299088imu; Fri, 16 Nov 2018 02:45:32 -0800 (PST) X-Google-Smtp-Source: AJdET5eiZib8LZHdUYTFrGhDJOCy0C3oQnsPv2L6zjvAnLd4FXoBkVRHeV8jIXxZ8PXjmCCt5h3F X-Received: by 2002:a63:6782:: with SMTP id b124mr9518375pgc.151.1542365132413; Fri, 16 Nov 2018 02:45:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542365132; cv=none; d=google.com; s=arc-20160816; b=SJRb59jAYcxjIfbNIAJmeK3ZtDQYaQEJF0930oCf1/ps4yiQpvG68lLaMDrwsZvS6s YfhUOKfhjxYIc/b99kbiVBVWTvTN6QYXya0H3JWonkL3UkHpg+Qc6ap+XHJM7j1BAeaB TRac2l9Kyaa6YfX37ZTi0JKTzpy0nf1ZMKENRIfxz2pUWoqcwCh2gmfw3oEctpRNqIVo 2oowKGKQ1douzV4uVesrD77V1j8jkrA5cImFQAmQMkMMwClpSvW6LNGeJ6kc0nc0Vb/N BNaBDsAOz8tRa2qf5qe2oKH4xM2Bp7d4aK25jX/emwqp2EETNF2bjt2P3FxE7X1eJxSR ocvQ== 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; bh=NAHIBR0kpgb8vGxq5nRSLAqHXhzxdKxBG/hdDGlSCXI=; b=lzfpZcrApSMLgF9imZz+IBvxgQssv/3nRdxqoNboaYd6eXP8ZKKv5tKs59kpXmOQiR hg213fEJn9AfPbAVyWnGTQIp+GgGW67QhfrT6nW/uWz3CytsLWVgyuRGx7h3fEzkZ44g UF89sT7J3wKk8WdUtfMxXNCN4rSiI6Q1hmr5blfMGj/bRzi2BASHBYnSDgKL47dscrHw Fdm0Waphg14cg22XV/R5bC1iRepGdyVJZE0ETe70S1io6LYjgyCBMH1mx5STs8enuXGU BAxAyqd4pEDrOlO3b1emu3UClzc+I826Lb/zPoJyfSgyJJzvJiseDrWDWty4P8LtXMW4 EGYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=TAJBWDGH; 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 w66si30127692pgw.64.2018.11.16.02.45.18; Fri, 16 Nov 2018 02:45:32 -0800 (PST) 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=TAJBWDGH; 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 S2389597AbeKPU42 (ORCPT + 99 others); Fri, 16 Nov 2018 15:56:28 -0500 Received: from smtprelay.synopsys.com ([198.182.47.9]:47770 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389504AbeKPU40 (ORCPT ); Fri, 16 Nov 2018 15:56:26 -0500 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 93B0624E0F71; Fri, 16 Nov 2018 02:44:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1542365079; bh=ptQ72Js7imq4lkt06zd7bcpddq8Vm576WAOYacKoaqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TAJBWDGHAAJe6u3HYX1Y5gxY4PDbFEkx8FbhMSvZjv/JggK1rbKML4JYtTG0De94/ Oo/Ad5bbuEYRu09BpZMv80JPLF1MR8Ys1tSOOlKjO+9pzsXOHcO6jBuolhhdJ7jV9e MXio0RT1LuUy++vql7SmRNsA5ggaPKLL7Yfq/aHV2C00CeG6ypJIO7yINWrzT2Xjp0 O0mwRupUDgmjAHo3mE8GFNO4YG/lwT17Ec9JlKUzdKAUW1xIAfk9HyEI1xO5L5QNxh vksPkLjoLzEOvQn3N6z+aNpOjzHQY1xn0erjHfl7ma+3YcfT+AvVGw5Lz+2FZVpEhl 0MMuWX7miiyDw== Received: from paltsev-e7480.internal.synopsys.com (paltsev-e7480.internal.synopsys.com [10.121.3.66]) by mailhost.synopsys.com (Postfix) with ESMTP id DF5FD55BF; Fri, 16 Nov 2018 02:44:37 -0800 (PST) From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org, Vineet Gupta Cc: linux-kernel@vger.kernel.org, Alexey Brodkin , Eugeniy Paltsev Subject: [PATCH 3/3] ARC: show detaled SmaRT configuration in mumbojumbo Date: Fri, 16 Nov 2018 13:44:27 +0300 Message-Id: <20181116104427.25264-4-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20181116104427.25264-1-Eugeniy.Paltsev@synopsys.com> References: <20181116104427.25264-1-Eugeniy.Paltsev@synopsys.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add information about SmaRT entries number and SmaRT SW support. Signed-off-by: Eugeniy Paltsev --- arch/arc/kernel/setup.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index c5641e6ffc2a..20fe3fcf8306 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -210,8 +210,7 @@ static void read_arc_build_cfg_regs(void) READ_BCR(ARC_REG_AP_BCR, bcr); cpu->extn.ap = bcr.ver ? 1 : 0; - READ_BCR(ARC_REG_SMART_BCR, bcr); - cpu->extn.smart = bcr.ver ? 1 : 0; + cpu->extn.smart = smart_exist() ? 1 : 0; READ_BCR(ARC_REG_RTT_BCR, bcr); cpu->extn.rtt = bcr.ver ? 1 : 0; @@ -333,12 +332,20 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len) IS_AVAIL1(cpu->extn.fpu_sp, "SP "), IS_AVAIL1(cpu->extn.fpu_dp, "DP ")); - if (cpu->extn.debug) - n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s%s\n", + if (cpu->extn.debug) { + n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s", IS_AVAIL1(cpu->extn.ap, "ActionPoint "), - IS_AVAIL1(cpu->extn.smart, "smaRT "), IS_AVAIL1(cpu->extn.rtt, "RTT ")); + if (smart_supported()) + n += scnprintf(buf + n, len - n, "SmaRT (%u entries)\n", + smart_stack_size()); + else if (smart_exist()) + n += scnprintf(buf + n, len - n, "SmaRT (outdated)\n"); + else + n += scnprintf(buf + n, len - n, "\n"); + } + if (cpu->dccm.sz || cpu->iccm.sz) n += scnprintf(buf + n, len - n, "Extn [CCM]\t: DCCM @ %x, %d KB / ICCM: @ %x, %d KB\n", cpu->dccm.base_addr, TO_KB(cpu->dccm.sz), -- 2.14.5