From patchwork Tue Feb 22 14:15:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 1596020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=uT5oKqx6; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=hRMqRnBm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K31RS0HkSz9sGF for ; Wed, 23 Feb 2022 01:15:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/TSuoFxojpoC9URKQuD+ngbISqKKKRIQgeE+AcTrhBE=; b=uT5oKqx6Pj3U0m 6KcpfjpuT3lAD/8DSKibnssNWowZ7wEIqzL68VVXYxZ7sgCeGBgd27SJlN968q+EUjO+v10AdwZxy RV0Dp4Sscfz27mJmjSwj69y9RevLZsTvrr0Vg1jHJvoa+/NOTmCKeB8HSuNgi0pNRM37fItPj3EnW tl1Fob9yCVmoNQNFN1x1xAu0LaAKVFj66s3pPBLsipNs1xOK3pLRHhaX8bnnS0SbZjOAWufkPF47H na3/FUlpviqTvdlMxZykdq+mv5xfbDDY5IG/aFeHcUf6IDUhFD/SzNMSHS4G7diKB7C3KKkKBcQBG gPZuvN/Na2yMGRyCt+cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMVx9-009qiD-R3; Tue, 22 Feb 2022 14:15:43 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMVwr-009qTk-7j for linux-snps-arc@lists.infradead.org; Tue, 22 Feb 2022 14:15:30 +0000 Received: by mail-lj1-x234.google.com with SMTP id o6so19769628ljp.3 for ; Tue, 22 Feb 2022 06:15:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hUTYKvccuj4IaJsEO4evB8LuXdmLKUIPnuyh4uCrZoA=; b=hRMqRnBmTbiJBrlMrDN5MLCvU7Rz4Y6OSeqG0dH67wuKJcXNpefarjFlRHFru8/DNX NEd76nzfFR2TbFmo2ZKpy9Bsp/DLCXVnCVdfxTAIwnFp+YefzN3O38ks67KyV2DfT2es j5C3XDwXx7sOxr4YwrwkMSNMIXVOWJsYHQwH1qmcS2EhdcY4wHw8J73zMvGIKi4pmyp/ jslRt/NHc2jnqBRgVXaWswB1ADXd4yRjuRSLY+JeB+R+Ko+gK15t6K8zC/JussEeiRku Tn/KqvYXJF4JiSrqXyLxJmIvid41WqH5a0yEHQZ4AyXEVi8wUUbYLm6+sRdkZl9RB0zZ 0mgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hUTYKvccuj4IaJsEO4evB8LuXdmLKUIPnuyh4uCrZoA=; b=JdIXBUhyDlHMwbKOKAmgwtlb1K7vZM+V7YZuAKBimsd9iSw6IQG6OsR3nOnpvbQLXz Tzh/MJYtmPjfTy26EaoQsO9FhTTNvkJwh9gjznWDHJFJy76kncZNrw2tDO3N0P5402E8 UVtgjvjeA6hsV5tJfi97ASUGXXY+d5YBKuNDtsyNz+jpHPVGRfj+NR5YYUe/T3K148su GpvMaj1UaIMFS32vXgrNkw293PAHYfpuo31J2OFpOicyIp4I9xdXDKprRYsEUIFLD75P mwOENnJ3rXN0O/PgyFDSesHcTdTlbQSoicTryUjbGzG5LPU0h4NLFJbj+vYAcCtbRmcG 1ifA== X-Gm-Message-State: AOAM531o4RqXCCqFh4qKh01UlWnDM4Nv+sdCGqd/kbj85QiloHmswgRr 46Perq3ZpATmtI6RKTLlmFEkSsfpvOo= X-Google-Smtp-Source: ABdhPJyUt0VoWL+8vNcto2x5HFGOSXGC6bQfMx5wwXXuWf2lD8ejvEEJjJ4UgGCgXs8VuyNeVGaHkQ== X-Received: by 2002:a05:651c:386:b0:246:c7e:bb1e with SMTP id e6-20020a05651c038600b002460c7ebb1emr17871650ljp.161.1645539323491; Tue, 22 Feb 2022 06:15:23 -0800 (PST) Received: from localhost.localdomain ([5.188.167.245]) by smtp.googlemail.com with ESMTPSA id m8sm1707047ljb.131.2022.02.22.06.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 06:15:23 -0800 (PST) From: Sergey Matyukevich To: linux-snps-arc@lists.infradead.org Cc: Vineet Gupta , Vladimir Isaev , Sergey Matyukevich , Sergey Matyukevich Subject: [RFC PATCH 09/13] ARC: delay: elide ZOL Date: Tue, 22 Feb 2022 17:15:02 +0300 Message-Id: <20220222141506.4003433-10-geomatsi@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220222141506.4003433-1-geomatsi@gmail.com> References: <20220222141506.4003433-1-geomatsi@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220222_061525_359606_7B8293BD X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Vineet Gupta Add __delay implementation based on DBNZ if ZOL is not supported. Signed-off-by: Vineet Gupta --- arch/arc/include/asm/delay.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:234 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [geomatsi[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Vineet Gupta Add __delay implementation based on DBNZ if ZOL is not supported. Signed-off-by: Vineet Gupta --- arch/arc/include/asm/delay.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arc/include/asm/delay.h b/arch/arc/include/asm/delay.h index 54db798f0aa0..e061d1c64f24 100644 --- a/arch/arc/include/asm/delay.h +++ b/arch/arc/include/asm/delay.h @@ -16,9 +16,12 @@ #include #include /* HZ */ +#include extern unsigned long loops_per_jiffy; +#ifndef CONFIG_ARC_LACKS_ZOL + static inline void __delay(unsigned long loops) { __asm__ __volatile__( @@ -31,6 +34,19 @@ static inline void __delay(unsigned long loops) : "lp_count"); } +#else + +static inline void __delay(unsigned long loops) +{ + __asm__ __volatile__( + " add %0, %0, 1 \n" + "1: nop \n" + " DBNZR %0, 1b \n" + : "+r"(loops)); +} + +#endif + extern void __bad_udelay(void); /*