From patchwork Mon Jun 24 13:54:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Suligoi X-Patchwork-Id: 11013207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 326F076 for ; Mon, 24 Jun 2019 13:55:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21C062870F for ; Mon, 24 Jun 2019 13:55:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12D31287FE; Mon, 24 Jun 2019 13:55:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5395A2870F for ; Mon, 24 Jun 2019 13:55:53 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=UYnWElDJndz7z8NXsLd0A7RBqcLyY0WAV0Vudz62UeI=; b=l0Pb6UAbmY1ctL GnvV4vtBQQafpNdrwsHv4UUrOHdUTW0qIhv0krcqc+zmgyW00EIAFl2Tv2aCObawn+DSc3T/F59XI 3pv6yphChpzFQS2PgLCaUpxh8CABFj4MfO+lWvSHaO2wBn/lZbmpFD19ZW89ZvXEv+ZbV0Jo8qwd+ hipt83Z8jw8S9oPS6sz8+XEezVGSxLeoCWqJP/6YvljKgh7ecitK6u0eesuM4xjuGHvAN9SH5otKN 8Ko0gk9ST1Weroz+b81DEakDQpwbZufQg7IGrs/+KgDh2Cs9NTsbQNI9s3yH6HdytEX7mEtJW/KUX 4e/RBvHaF5kJ7CyU2OhA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfPRn-0005Aw-Qf; Mon, 24 Jun 2019 13:55:51 +0000 Received: from smtp.asem.it ([151.1.184.197]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfPRj-000591-Sd for linux-arm-kernel@lists.infradead.org; Mon, 24 Jun 2019 13:55:49 +0000 Received: from webmail.asem.it by asem.it (smtp.asem.it) (SecurityGateway 5.5.0) with ESMTP id SG003966016.MSG for ; Mon, 24 Jun 2019 15:55:42 +0200S Received: from ASAS044.asem.intra (172.16.16.44) by ASAS044.asem.intra (172.16.16.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 24 Jun 2019 15:55:42 +0200 Received: from flavio-x.asem.intra (172.16.17.208) by ASAS044.asem.intra (172.16.16.44) with Microsoft SMTP Server id 15.1.1261.35 via Frontend Transport; Mon, 24 Jun 2019 15:55:42 +0200 From: Flavio Suligoi To: Russell King , Alexios Zavras , Allison Randal , Greg Kroah-Hartman , Thomas Gleixner Subject: [PATCH] ARM: mm: print L310 cache controller version Date: Mon, 24 Jun 2019 15:54:49 +0200 Message-ID: <1561384489-29906-1-git-send-email-f.suligoi@asem.it> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-SGHeloLookup-Result: pass smtp.helo=webmail.asem.it (ip=172.16.16.44) X-SGSPF-Result: none (smtp.asem.it) X-SGOP-RefID: str=0001.0A0B0202.5D10D65F.0004, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 (_st=1 _vt=0 _iwf=0) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190624_065548_106686_6ED57EE0 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Flavio Suligoi , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The knowledge of the cache controller version is very useful during the comparison of the performances of similar boards, with similar CPU but different versions of the L310 controller. Signed-off-by: Flavio Suligoi --- arch/arm/mm/cache-l2x0.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 5b251c8..e5ac670 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -590,6 +590,34 @@ static void l2c310_configure(void __iomem *base) if (revision >= L310_CACHE_ID_RTL_R3P0) l2c_write_sec(l2x0_saved_regs.pwr_ctrl, base, L310_POWER_CTRL); + + /* Display L310 cache controller version */ + switch (revision) { + case L310_CACHE_ID_RTL_R0P0: + pr_info("L2C-310 revision: r0p0\n"); + break; + case L310_CACHE_ID_RTL_R1P0: + pr_info("L2C-310 revision: r1p0\n"); + break; + case L310_CACHE_ID_RTL_R2P0: + pr_info("L2C-310 revision: r2p0\n"); + break; + case L310_CACHE_ID_RTL_R3P0: + pr_info("L2C-310 revision: r3p0\n"); + break; + case L310_CACHE_ID_RTL_R3P1: + pr_info("L2C-310 revision: r3p1\n"); + break; + case L310_CACHE_ID_RTL_R3P1_50REL0: + pr_info("L2C-310 revision: r3p1 50 rel0\n"); + break; + case L310_CACHE_ID_RTL_R3P2: + pr_info("L2C-310 revision: r3p2\n"); + break; + case L310_CACHE_ID_RTL_R3P3: + pr_info("L2C-310 revision: r3p3\n"); + break; + } } static int l2c310_starting_cpu(unsigned int cpu)