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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 A79B6C433EF for ; Fri, 24 Sep 2021 13:56:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78F4C61076 for ; Fri, 24 Sep 2021 13:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346518AbhIXN6O (ORCPT ); Fri, 24 Sep 2021 09:58:14 -0400 Received: from 8.mo548.mail-out.ovh.net ([46.105.45.231]:34171 "EHLO 8.mo548.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbhIXN6N (ORCPT ); Fri, 24 Sep 2021 09:58:13 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.1.235]) by mo548.mail-out.ovh.net (Postfix) with ESMTPS id D6BCF214DD; Fri, 24 Sep 2021 13:56:37 +0000 (UTC) Received: from kaod.org (37.59.142.97) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Fri, 24 Sep 2021 15:56:37 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-97G002cc673897-dfc8-439b-bd13-e8669eeec224, EA4874C54EC1FB151381C7D8681494D1EB26EF60) smtp.auth=clg@kaod.org X-OVh-ClientIp: 82.64.250.170 Message-ID: <0c180f94-50df-1cbe-3cf6-62904b017a8c@kaod.org> Date: Fri, 24 Sep 2021 15:56:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH 1/3 v2] clocksource/drivers/fttmr010: Be stricter on IRQs Content-Language: en-US To: Linus Walleij CC: Daniel Lezcano , Thomas Gleixner , linux-kernel , Joel Stanley , Guenter Roeck References: <20210922195656.1822268-1-linus.walleij@linaro.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.59.142.97] X-ClientProxiedBy: DAG1EX2.mxp5.local (172.16.2.2) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: f69528f4-e6e2-4fa6-b697-ec534f6e555b X-Ovh-Tracer-Id: 15642408884650478374 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrudejuddgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfhisehtkeertddtfeejnecuhfhrohhmpeevrogurhhitggpnfgvpgfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepieegvdffkeegfeetuddttddtveduiefhgeduffekiedtkeekteekhfffleevleelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtoheplhhinhhugiesrhhovggtkhdquhhsrdhnvght Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/23/21 23:05, Linus Walleij wrote: > On Thu, Sep 23, 2021 at 10:11 PM Cédric Le Goater wrote: > >> I think we should start by dropping all the AST2600 code which >> is unused. > > I don't see why, the hardware is there is it not? The TMC34 register is different on the AST2600. The only piece of code that makes sense is in ast2600_timer_interrupt() : writel(0x1, fttmr010->base + TIMER_INTR_STATE); which clears the status. If you really insist on keeping the AST2600 support, then I would rework a bit ast2600_timer_interrupt() : drop TIMER_1_INT_OVERFLOW and may be use BIT(0) instead of TIMER_1_INT_MATCH1, since the register layout is different. There are 8 timers on the AST2600. Thanks, C. > In my experience it is unwise to try to system manage the kernel, > decide what hardware gets exposed to the frameworks and which > does not. > > There have been instances in the past where we have first said we don't > need another timer on the system (so it is "dark silicon") and later brought > it back because it has some upside. > > For example for a while the Ux500 was using clksrc-dbx500-prcmu.c > exclusively because it was the only clocksource that would not stop > during sleep, and nomadik-mtu.c was unused. Then we invented a > way to grade the different clocksources and switch between them > before sleep, but tagging one of them with > CLOCK_SOURCE_SUSPEND_NONSTOP and giving them the right > rating, see commit bc0750e464d4. > > This was good because nomadi-mtu.c has higher granularity and > higher frequency when the system is awake but clksrc-dbx500-prcmu.c > is always ticking, so each is used for different purposes. > > Lesson learned: register all hardware with the timekeeping core and > let the kernel decide what timer to use at what point and for what. > > Yours, > Linus Walleij >