Received: by 10.223.148.5 with SMTP id 5csp7456677wrq; Thu, 18 Jan 2018 05:49:56 -0800 (PST) X-Google-Smtp-Source: ACJfBovF3s6Pay1wgJuZNorM6z+emkcLn420543F0iMb9cFebf99SJL6NJ7Ek1bQF6dE0NlczUIA X-Received: by 10.101.86.4 with SMTP id l4mr25226341pgs.276.1516283396869; Thu, 18 Jan 2018 05:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516283396; cv=none; d=google.com; s=arc-20160816; b=b84ohO7D9y+F5BoPT3pGQir+qG7d9Rgolkn9ZC2mPcLo6I/tJ1cSx00W5limaIU/nP iTy1IjTGu1f/Bt7raSB/6hMclVv6/rWhzNPW0oYQCVmFPIRe4QLniXfaBdveZSXzJJz+ 5R4gDgjjm4sK3GF+ow3/F47iA4RFB7Tzl7D3VvJejwgL8EAEXVSkg6G0gcz6Zf1nTp/N lIzUzEts/eksdVDwtEYHy3Ka71hEr8z92HsfzzyamE+FMT/ehRFSTaDizNnBiq9XNzpJ UaYXO1Oh6ZSC8RU7N0xqA9rFNknMySlzoTHxs42ldp+UmGw+e5N8YLbPkTYsQE3ljElx yBZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=VclFwAbV4g7Mkeccnw86wmyHACgdhfXpod4590VP910=; b=s+IFTKhdJP/66FdFFpipOvr6GoRa5kGJ3mD6RXPk1udUp4UMBfMj5znN0FWN1E8/ps BQwmwP2MMeMsABEskQHLDnOETZbV+5uVclBBU7p7RbykKbAwdtVL2jbQNe55FtQZraar ZXhO52+EUtrTD6kW1F+gqlR6Dcl0IeJCfM5ayZ39CwC+RjVrDOaYJRmi6lNUTrGSi+N9 Fr997j6FsB861FjzWHG4gr0HNzZk75sAtqDujGHF299NHOk/rmo9mjTWf5oH1CrtNC5X dGtQ1tIsDOOijCbu/Sompxfm3slx+LSIvxnTqorVrVqXim2Ecz88/1OzVqU04d9/JiYw J3bg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 z1si6044013pgs.409.2018.01.18.05.49.42; Thu, 18 Jan 2018 05:49:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756346AbeARNsh (ORCPT + 99 others); Thu, 18 Jan 2018 08:48:37 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:43995 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756206AbeARNsg (ORCPT ); Thu, 18 Jan 2018 08:48:36 -0500 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 1941D24E13DC; Thu, 18 Jan 2018 05:48:36 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 05339B96; Thu, 18 Jan 2018 05:48:36 -0800 (PST) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id CF6E9B8F; Thu, 18 Jan 2018 05:48:34 -0800 (PST) From: Alexey Brodkin To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Vineet Gupta , Alexey Brodkin Subject: [PATCH] ARC: Add a knob to control usage of dual-issue Date: Thu, 18 Jan 2018 16:48:31 +0300 Message-Id: <20180118134831.41489-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HS48 core starts with dual-issue enabled but in some cases like debugging as well as benchmarking it might be useful to disable dual-issue for a particular run. Note: 1. To disable dual-issue user has to change a value of a global variable in target's memory right before start of Linu kernel execution (most probably via JTAG) 2. Disabling happens very early on boot and to get it back enabled it's required to restart Linux kernel. I.e. with this change we don't allow toggling dual-issue state in random moments of run-time Signed-off-by: Alexey Brodkin --- arch/arc/kernel/setup.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 9d27331fe69a..cf97f7d88934 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -31,6 +31,8 @@ #define FIX_PTR(x) __asm__ __volatile__(";" : "+r"(x)) +int dual_issue_enable = 1; + unsigned int intr_to_DE_cnt; /* Part of U-boot ABI: see head.S */ @@ -198,6 +200,17 @@ static void read_arc_build_cfg_regs(void) if (cpu->core.family >= 0x54) { unsigned int exec_ctrl; + if (!dual_issue_enable) { + /* + * Note: + * 1) Reset value in AUX_EXEC_CTRL is 0 + * 2) Reverse logic is used, + * i.e. by default (AUX_EXEC_CTRL=0) + * dual-issue is enabled. + */ + write_aux_reg(AUX_EXEC_CTRL, 1); + } + READ_BCR(AUX_EXEC_CTRL, exec_ctrl); cpu->extn.dual_enb = !(exec_ctrl & 1); -- 2.11.0