Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp478082ybm; Fri, 29 May 2020 05:00:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0uS0zmH75nnm7QR9nGNBvrGEoizhHpoX4f1OKXwavd1VioViLwz8rA9GmKxK9ymxfkZ+V X-Received: by 2002:a17:906:c7d1:: with SMTP id dc17mr7951953ejb.166.1590753604460; Fri, 29 May 2020 05:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590753604; cv=none; d=google.com; s=arc-20160816; b=UqcYrOhW3xa+zgal5SxkoicUuXNrltif6lWKGdyIC6T+9ZRbX2Q5WdZF+HkfgizVIL haqHm0A5ZkPt8iRwXqVCmkDQZFs65S0SbzRuXBFZLMRxv1jNM+WroWi8navNRKF3/Gbd CoK7bZ1UK7ULnBNgyu6gV0cOEnmAaVxXe/Zgv+uP1OxeIogiFstNcr3SwhHnd+syDjax dxg9RyIaeIyYikgg1JP4EvKaEcATInKJS86hryWKp/DuYTpOwfNGBz+cqkaDn4v2YYjF JsDiePRKNjLbJBQ3iUex897rz1btZ6zLxlmvJfzLFlcY+obMC+PV+iw/EOU3CB8LgGd7 QXIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EitXa9YeE3S5Wpk8Xd32ZyOCNE0yJLtvz7aev0dxl8I=; b=oy3ANv+zzH3RGVxj9sq7Br/ozh9MFpMw9ys4VYFwaDIYhvkwuKJ9V3PehRILogFBs6 A5uKsXTmIB6ovOl4BeKB9ETNztgMvYV1vwbE5ldPOKRBr1vLzgmXQQ1ENeuLqwqpmDKD xYPFdJwfH9fJwW+EV2Gr9V1+Yo+uTgsG6qLsjUKgQOjrYKIHOteXAFBDd6oOMAgTflHw bzHx+dBy37PT5epo7rb5+FUkc471TxquTIOQ7JDoL6X6iLUB5b5/p7guVuduBz/ANZeb JWn4NB+mjRyyil7bKoWZ41ppQuKbAxfHJdq6HOqKNye8Fefbf+lmiTF54pUFMnrGvqtv WV0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=lnfWLNTz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si664829ejx.476.2020.05.29.04.59.40; Fri, 29 May 2020 05:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=lnfWLNTz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbgE2Lz7 (ORCPT + 99 others); Fri, 29 May 2020 07:55:59 -0400 Received: from smtprelay-out1.synopsys.com ([149.117.73.133]:48634 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbgE2Lz6 (ORCPT ); Fri, 29 May 2020 07:55:58 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id A3F3C40926; Fri, 29 May 2020 11:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1590753357; bh=Dfq6lwwFSUj6yhixC7HC3wj+k/9vWHYyBBePg4pROUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lnfWLNTzm2zxsgJbXVIrsGD9VLE6s4aloIATJH8KQGf+RHE7TObrPmT0XF9Sx1CtJ 85Llme5jRD6e1LNAJM6G6Xvzzoo0FTaIXgHrnrBihGuRVtCZl9y5wXxg4yhSFpEI62 miEN7uesQGhxjCXzzKbigyoOJbqaa1P75ESscXpttqyx2FOweHTZBKS7u1u55UJqZN qxsHDHULxe+sbjhIVEw9O/ATaptfhH8T3RiCl2U/gr46d6Nw+sR8G/Oe4C1nzvS9ia FAlo6eb0g4xX2Ddz4PEbzVazI8/EzJcubxoq7jq6u6chdyIi+bBw5r44/inAoKPZ0r 9bv9nx9pU4q9g== Received: from paltsev-e7480.internal.synopsys.com (ru20-e7250.internal.synopsys.com [10.225.50.16]) by mailhost.synopsys.com (Postfix) with ESMTP id 78BF5A006B; Fri, 29 May 2020 11:55:53 +0000 (UTC) X-SNPS-Relay: synopsys.com From: Eugeniy Paltsev To: linux-snps-arc@lists.infradead.org, Vineet Gupta Cc: linux-kernel@vger.kernel.org, Alexey Brodkin , Eugeniy Paltsev Subject: [PATCH 2/3] ARC: ARCv2: support loop buffer (LPB) disabling Date: Fri, 29 May 2020 14:55:33 +0300 Message-Id: <20200529115534.22883-4-Eugeniy.Paltsev@synopsys.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200529115534.22883-1-Eugeniy.Paltsev@synopsys.com> References: <20200529115534.22883-1-Eugeniy.Paltsev@synopsys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On HS cores, loop buffer (LPB) is programmable in runtime and can be optionally disabled. Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig | 6 ++++++ arch/arc/kernel/head.S | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 2d4f85dc914e..270504d4fdf5 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -471,6 +471,12 @@ config ARC_IRQ_NO_AUTOSAVE This is programmable and can be optionally disabled in which case software INTERRUPT_PROLOGUE/EPILGUE do the needed work +config ARC_LPB_DISABLE + bool "Disable loop buffer (LPB)" + help + On HS cores, loop buffer (LPB) is programmable in runtime and can + be optionally disabled. + endif # ISA_ARCV2 endmenu # "ARC CPU Configuration" diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index 6eb23f1545ee..17fd1ed700cc 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S @@ -59,6 +59,14 @@ bclr r5, r5, STATUS_AD_BIT #endif kflag r5 + +#ifdef CONFIG_ARC_LPB_DISABLE + lr r5, [ARC_REG_LPB_BUILD] + breq r5, 0, 1f ; LPB doesn't exist + mov r5, 1 + sr r5, [ARC_REG_LPB_CTRL] +1: +#endif /* CONFIG_ARC_LPB_DISABLE */ #endif ; Config DSP_CTRL properly, so kernel may use integer multiply, ; multiply-accumulate, and divide operations -- 2.21.3