From patchwork Fri Nov 16 10:44:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 998845 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="pKi2mfDS"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="kzKeISfc"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="TAJBWDGH"; 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 42xFHC5YcFz9sBQ for ; Fri, 16 Nov 2018 21:44:55 +1100 (AEDT) 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=LwU0flkwHLPnJ9hrm9LnMxysfVKySw8CNpocFN4g+yY=; b=pKi2mfDSQS0hLm8G9ibYb8luKM m/QPaGVQYgL5JM8cMA9Nt9OSaS5/DmNyoLi4x3ixuk80rWWz2HFHsb5Xm93lkUoG9nHsIdYy5M5jG IyGyqai//z4NAWAgDhfmwJ0daNOPpBj/TOx9IHKRNbtEq9N72h5RRxT3BE8edGdQFKedaJpoUQr7L udhJ1pZ+7Huf7Y+o5SJmfRxWLGdQ3q/dlWxuVFm3fzh6gXxmo1tihbWwk6FiE2BwulkaHmCafoDp5 i7PF36ytlE4eel8WRSE19sq8ZdE6BqK3WQOWa/ZVPUjuGW9PwnRjqvM6WFj+B1J7/osrcwQvOTrnO MF4uA8jQ==; 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 1gNbcL-0002vo-PS; Fri, 16 Nov 2018 10:44:53 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNbcI-0002vQ-D4 for linux-snps-arc@bombadil.infradead.org; Fri, 16 Nov 2018 10:44:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NAHIBR0kpgb8vGxq5nRSLAqHXhzxdKxBG/hdDGlSCXI=; b=kzKeISfcNCc8N083xok6r4k/B cexuyadegO+uWS8NliTjESbipKQXBS322fdKOnm9U6rOTXnQAb/6G/UtiPrsGjPUR3I3VfHzf92na UMueWzeMgKW3UUZ9sAxR48JvYyT6szLCR8tBDwutKb0VsMiOVSVaE157HRN8Wi1JvuSPyoT+Ao8rZ Hz8FS9pFKSjtXwbGf+wWL67FRgo+Um9U3cCUTtmnq5hYkg4ezZXgQk9I6F9iOI1vyCsLHpYX4Rd5I LOO7E8RhWccaQpobViqPqFWFyfbFJSXfpLLj7mkb4vI64nat0i6v0oKbvkciZI6e54wPF0xyJrHS0 /BQtvXFfg==; Received: from us01smtprelay-2.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNbcF-00060g-5e for linux-snps-arc@lists.infradead.org; Fri, 16 Nov 2018 10:44:48 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_104447_358794_50D98CD5 X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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 -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] 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: Alexey Brodkin , Eugeniy Paltsev , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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),