From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755758AbeARTLH (ORCPT ); Thu, 18 Jan 2018 14:11:07 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:50712 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754513AbeARTLF (ORCPT ); Thu, 18 Jan 2018 14:11:05 -0500 From: Alexey Brodkin To: Vineet Gupta CC: "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: [PATCH] ARC: Add a knob to control usage of dual-issue Thread-Topic: [PATCH] ARC: Add a knob to control usage of dual-issue Thread-Index: AQHTkGMKZmCMlYEXEE26MA9rRbiEtKN56iAAgAAEfoA= Date: Thu, 18 Jan 2018 19:11:01 +0000 Message-ID: <1516302661.8324.32.camel@synopsys.com> References: <20180118134831.41489-1-abrodkin@synopsys.com> <7d97edc0-d0ee-326b-bcd2-c6731aa953b2@synopsys.com> In-Reply-To: <7d97edc0-d0ee-326b-bcd2-c6731aa953b2@synopsys.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.121.8.86] Content-Type: text/plain; charset="utf-8" Content-ID: <8DD6F7E68BD2B44EBAF73182FF74B6CC@internal.synopsys.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id w0IJBBpF028072 Hi Vineet, On Thu, 2018-01-18 at 10:54 -0800, Vineet Gupta wrote: > 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 ? I think there's some sense in a global variable. 1. Not sure if OpenOCD/GDB pair for ARC allows to read/write random AUX regs. Probably allows but I guess we'll need a new .xml description which lists EXEC_CTRL AUX reg. Correct me if I'm wrong here. 2. If somebody wants to disable dual-issue persistently (here I mean building an image which had dual-issue disabled and there's no need to alter anything after image loading) then it's possible just to change a simple and very obvious line in arch/arc/kernel/setup.c other than trying to guess what could be good place in sources to stick that AUX reg write. Note we don't explicitly do reads of AUX_EXEC_CTRL instead we just use READ_BCR macro so for newcomers it might not be immediately obvious what to do and where. Add the fact that logic of the flag is reversed... -Alexey