Received: by 10.223.148.5 with SMTP id 5csp7906100wrq; Thu, 18 Jan 2018 10:56:49 -0800 (PST) X-Google-Smtp-Source: ACJfBoswPt7VdImBG9E4REYzqG2AOrA7ag9ujEgo6wqNcRLPlQsfkA4Q8KdWhx+pTLIThHxx3Kdj X-Received: by 10.99.160.26 with SMTP id r26mr12509117pge.230.1516301808998; Thu, 18 Jan 2018 10:56:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516301808; cv=none; d=google.com; s=arc-20160816; b=oW0YUfHAJ8QYcA3bzGN2IvBD9Ky/wXny8F++0WnKM0Pv4IvnM6sWuepNd8D4kYlx2h 2rK4HzLwKTeXDvObKOXineYg7ndesmjsEvvYchvdtrJataIwzBwHlohO9rfOrTzssjKT ogUPbVYysPwtX8jY2gmgm6zXtV2Hrx7cbQpxG/8HBfH3XuRiHHeVHGdjumlpemj0z+M8 WMAmnQxx93cWt1xVYShGDz4BxGPHpEzqrhL/gLdGlGT8BQrtBP0pdGKQFpAS+OykGwqD vlBr6niAfFWfz95p6JigXcob+AxHb08LonNPjM1x5liYgRbXfK65yiYH2XpOPo0+ZM4V 52pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=CkS0Hi1cQws9kSgZnAXCkVJq6H9X1sS+B/uzypqdHJk=; b=T0cbzWuizvI5aQAgTYLrGePmpdx0I+YF9f0WxWCGsX8cd2d6cPzzFqLq76ny3Wza/F RXIaCCGBnE9Rw23l6BT/lsEwMxrpyqcl9qRDTIf7H9TZXODo+I2uuNMnYq9mDLHNikD/ tkayJzn4CaXeQempTNaKbgTpj5DJFO0hr6c6429/wW72p4qsaOSC89UNq47pmC6sQo3X 3E+P4n9EF/vdPxfR7Ox2vjbXlB4q7ntpjfAbu0jNBSxK4WVWIn6JXg0LJlQxfzMb7DK8 9+QuFS87A167Hoalyq6CAMCY8gSfy6qXTGNe6FH3NvkfJ0JISLvV4sLawnaPW2W/xPr9 /Jhw== 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 j11si6405443pgp.689.2018.01.18.10.56.34; Thu, 18 Jan 2018 10:56:48 -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 S932702AbeARSzG (ORCPT + 99 others); Thu, 18 Jan 2018 13:55:06 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:34841 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932089AbeARSzF (ORCPT ); Thu, 18 Jan 2018 13:55:05 -0500 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 334AC10C0A70; Thu, 18 Jan 2018 10:55:05 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 1E7986E0; Thu, 18 Jan 2018 10:55:05 -0800 (PST) Received: from US01WEHTC2.internal.synopsys.com (us01wehtc2-vip.internal.synopsys.com [10.12.239.238]) by mailhost.synopsys.com (Postfix) with ESMTP id 14D326DB; Thu, 18 Jan 2018 10:55:05 -0800 (PST) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP Server (TLS) id 14.3.266.1; Thu, 18 Jan 2018 10:55:03 -0800 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 19 Jan 2018 00:25:00 +0530 Received: from [10.10.161.79] (10.10.161.79) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 19 Jan 2018 00:24:59 +0530 Subject: Re: [PATCH] ARC: Add a knob to control usage of dual-issue To: Alexey Brodkin , "linux-snps-arc@lists.infradead.org" CC: "linux-kernel@vger.kernel.org" References: <20180118134831.41489-1-abrodkin@synopsys.com> From: Vineet Gupta Message-ID: <7d97edc0-d0ee-326b-bcd2-c6731aa953b2@synopsys.com> Date: Thu, 18 Jan 2018 10:54:56 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180118134831.41489-1-abrodkin@synopsys.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.10.161.79] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/18/2018 05:48 AM, Alexey Brodkin wrote: > 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 But we need access to a debugger anyways to change this global variable. If you already have that won't it be better to change the aux register itself from the debugger itself. I don't really see how the global variable way of toggle adds any value here ? > > 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); >