Received: by 10.223.176.46 with SMTP id f43csp122653wra; Thu, 18 Jan 2018 14:51:19 -0800 (PST) X-Google-Smtp-Source: ACJfBouMJWeofWIzq+2fInqcah43MAfwjYDy0Vo97Om50Cb8Rvhl+Er5fnREG5N7HU4xkSCqoSOF X-Received: by 2002:a17:902:b403:: with SMTP id x3-v6mr534795plr.192.1516315879474; Thu, 18 Jan 2018 14:51:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516315879; cv=none; d=google.com; s=arc-20160816; b=HeA0KbpVNns3Vn9FmVQaQ4kzwpwAb569SVZ7sE2yYmoGSDbfMA0zhGVZ5PaBruHqMs 4UOvXOBMl3nxUGOh4eriK4NzXAqhj+jR6lN1BqEs4kMRYVyAWSoiIxFnp/StoZYYCLGi sfa9WhCpSlW+bJ5zFUv8DXlZqtUlVZ4SoJHYyoxPVfGL5Y4hAbb6+cWswHBqnuGcK2na o3KuWhY6ucXAWItja1XWplTubpOhkM25XHIUROSaon52ahMHImWkXoY9YHq8EDxAKSZb F+RMUO2Z6PkGmV9+SZVTFffd2n/wqf0X9kpy5Cbo6HGXgFRkqf5Z2PtQkM89I80UlUAm 8jeA== 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=FOf523x47S+UTm2WM3SDz5rS/9eHEDf9+xc0pzRlACg=; b=Pf710KvdGGUkAHg7604q/DWXX/TvlXchD4hMSn64Pr2ye3n6bn8UybNPZamCYu3TJ9 LqjRJu/Vqj3162MNGX283b4FpBs/ZQ81iYZ6fRILK9n19Vwn0SywhBLoZ9vwrS2d+Ru5 VTZJNaIJkYnN5EYV06bWgpn8Y00TTvtTYlRjaNdq+1M3n4sc7mha+eqkXtyG+elAzhGQ xl8v47RFk0tmUoI0/VW9c4PjsI/02mE/m0N8drkxKsUg6F6DTvEI2qXN2LV+5hW9MwqK +MpAmoeTvbZ8ojXIu1c+Fwv1PZJcQKYnBpj8BQxUlmdKakES5SxCQEVBCtstmwSq9KI0 6D8Q== 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 u6-v6si275013pld.512.2018.01.18.14.51.03; Thu, 18 Jan 2018 14:51:19 -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 S932597AbeARWue (ORCPT + 99 others); Thu, 18 Jan 2018 17:50:34 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:39184 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932131AbeARWu1 (ORCPT ); Thu, 18 Jan 2018 17:50:27 -0500 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 7AA0410C0C73; Thu, 18 Jan 2018 14:50:27 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 6A9ED6F; Thu, 18 Jan 2018 14:50:27 -0800 (PST) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3-vip.internal.synopsys.com [10.15.84.231]) by mailhost.synopsys.com (Postfix) with ESMTP id 5FD726E; Thu, 18 Jan 2018 14:50:27 -0800 (PST) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.266.1; Thu, 18 Jan 2018 14:50:27 -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 04:20:24 +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 04:20:23 +0530 Subject: Re: [PATCH] ARC: Add a knob to control usage of dual-issue To: Alexey Brodkin CC: "linux-kernel@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" References: <20180118134831.41489-1-abrodkin@synopsys.com> <7d97edc0-d0ee-326b-bcd2-c6731aa953b2@synopsys.com> <1516302661.8324.32.camel@synopsys.com> From: Vineet Gupta Message-ID: <67318494-971f-0e3f-31e6-d19c59950cd5@synopsys.com> Date: Thu, 18 Jan 2018 14:50:22 -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: <1516302661.8324.32.camel@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 11:11 AM, Alexey Brodkin wrote: > 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. Not sure of this a strong argument ... > > 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) Ok this is more reasonable ! But can we do this in early boot code then. There's a fair bit of code leading up to where we are doing now so I'd prefer we do it just as we do for disabling L1 caches. Please note that SLC / IOC are special - as much as I liked to do them super early - we can't as there's fair bit of code bloat / mem size etc which we don't knwo that early. > 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