From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93A60C48BCF for ; Wed, 9 Jun 2021 11:46:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 496EB6100A for ; Wed, 9 Jun 2021 11:46:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 496EB6100A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9HNgBl70JKx0gcewryBUUZ0TUecSIco5Rz1ISOmThNw=; b=ULg3MOQYDiRWj2XCWgeHiRtDMe OUiUxC3Yzy+7k+wg0gG89yVPU0Oc+aZpkBWAJK5qfT/I5oGm2zagxXsWnL9Zt0dQG0fL2SUk9/46o VRV5T9dpoj7+o5nEM48pCAXl1zmu8g8YbAyyIDu4xS1pWwv3OZWdy+/cZ1N2sdxRDghz4QQv5pdk8 Oesu3rjaJtTNtB3l6+mQx2uBMHBo+zvqYCK0jBXPr2aDBb2uJEuOw1X9mOuXyQxOcFEud8aRW94vR WJg8OPJiVL2Ah0MEc3rVpDIDN4IrcASeTmjN+idtD5LRDMFMGLC+lUGs/jyqffujutY+f9tPZEkyD eP+GvOSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqwck-00DPQU-0i; Wed, 09 Jun 2021 11:43:55 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqwaZ-00DOlq-Oq for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 11:41:41 +0000 Received: from mail-wr1-f71.google.com ([209.85.221.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lqwaW-0005hK-UW for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 11:41:36 +0000 Received: by mail-wr1-f71.google.com with SMTP id h10-20020a5d688a0000b0290119c2ce2499so5702986wru.19 for ; Wed, 09 Jun 2021 04:41:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=upOJA9RE5vdAmyuKTS/wMi+tsqj8ittlIe4tXbPXaRk=; b=q5oWL/+K2hgVmg6qr4Ale28Wwer5yl0cTe4+BAzPGtJOIbJ9J9s29uxWzAVpz8GSqo TWhUQFfFuiYqGtdl0S8bp4rE4nRJuksoVsSNNvO2CzmJ+ZbYfb8OAzynmTMJzY92gTqZ 3pxSSgxZ09zlcp8xRtphtlUcdB9gjdlhIPiercdpdgJNnQg3LDuWtNJrMdZA8y5Pqela 4Wu6S0f811R70cLtedJbc4I+X1Jo1OQQFFsZXoxKu5B+g4y+57FZpdUxdzE+GWmAZ+As 5JLqvWisjFQHuElGMenmiV9f0IiWHXGPnJ/rmDBE/Lvvj2FC/7en3Dh56WKrSM4IPut0 1Fxg== X-Gm-Message-State: AOAM531r4TzP59O0V3gVAYyksACddMfkyxhu9p3Pd/F5b2d02OLdaOAm op+gJ5TIpmkFGMKaYbiT6nNmZYTqa0Zys3yeJDbkKnBGm1HvXaND8lyxa1Q63HcezfykqtcNBEU CjokuhNjyzaJHPqcoHu2ELHUeTIpt8lflIU5hmBByh1LsqorBwbeR X-Received: by 2002:a1c:bc09:: with SMTP id m9mr27809338wmf.143.1623238896527; Wed, 09 Jun 2021 04:41:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUpLz6zKKGLggAFA7+FVPvlclfbwWyQInR0T0RTysQGQfgiE2ya9oVBkUdprDeUukUMSlo9g== X-Received: by 2002:a1c:bc09:: with SMTP id m9mr27809326wmf.143.1623238896405; Wed, 09 Jun 2021 04:41:36 -0700 (PDT) Received: from [192.168.1.115] (xdsl-188-155-177-222.adslplus.ch. [188.155.177.222]) by smtp.gmail.com with ESMTPSA id n10sm10856124wri.77.2021.06.09.04.41.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 04:41:35 -0700 (PDT) Subject: Re: [PATCH 1/2] clocksource/drivers/exynos_mct: Prioritise Arm arch timer on arm64 To: Will Deacon , linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Marek Szyprowski , Krzysztof Kozlowski , Chanwoo Choi , Thomas Gleixner , Daniel Lezcano References: <20210608154341.10794-1-will@kernel.org> <20210608154341.10794-2-will@kernel.org> From: Krzysztof Kozlowski Message-ID: <7a3213a4-5f35-17b3-3d05-a5c6f032d1f5@canonical.com> Date: Wed, 9 Jun 2021 13:41:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210608154341.10794-2-will@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_044139_926860_C95D3921 X-CRM114-Status: GOOD ( 24.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 08/06/2021 17:43, Will Deacon wrote: > All arm64 CPUs feature an architected timer, which offers a relatively > low-latency interface to a per-cpu clocksource and timer. For the most > part, using this interface is a no-brainer, with the exception of SoCs > where it cannot be used to wake up from deep idle state (i.e. > CLOCK_EVT_FEAT_C3STOP is set). > > On the contrary, the Exynos MCT is extremely slow to access yet can be > used as a wakeup source. In preparation for using the Exynos MCT as a > potential wakeup timer for the Arm architected timer, reduce its ratings > so that the architected timer is preferred. > > This effectively reverts the decision made in 6282edb72bed > ("clocksource/drivers/exynos_mct: Increase priority over ARM arch timer") > for arm64, as the reasoning for the original change was to work around > a 32-bit SoC design. > > Cc: Marek Szyprowski > Cc: Krzysztof Kozlowski > Cc: Chanwoo Choi > Cc: Thomas Gleixner > Signed-off-by: Will Deacon > --- > drivers/clocksource/exynos_mct.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c > index fabad79baafc..804d3e01c8f4 100644 > --- a/drivers/clocksource/exynos_mct.c > +++ b/drivers/clocksource/exynos_mct.c > @@ -51,6 +51,15 @@ > > #define TICK_BASE_CNT 1 > > +#ifdef CONFIG_ARM > +/* Use values higher than ARM arch timer. See 6282edb72bed. */ > +#define MCT_CLKSOURCE_RATING 450 > +#define MCT_CLKEVENTS_RATING 500 > +#else > +#define MCT_CLKSOURCE_RATING 350 > +#define MCT_CLKEVENTS_RATING 350 > +#endif > + Tested on Exynos5422 (32-bit ARM) and it seems to work. I don't have ARMv8 board to check it. We want Exynos MCT on ARMv8 as well, because unfortunately it shares the block with Arch timer. This was investigated by Marek: https://lore.kernel.org/linux-samsung-soc/20181017123622eucas1p14654c89a8590fd094d638b60ab9af8f0~eZY3j27rs0422004220eucas1p1M@eucas1p1.samsung.com/ Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel