Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1997301pxb; Fri, 24 Sep 2021 17:28:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxC5Axqj9hXdaaVWJiuH2JjdWR40UlHwNkQDA4KYvNosNkdJ17gLLWRviY9XSTDFOuAzxHc X-Received: by 2002:a50:da07:: with SMTP id z7mr8467250edj.301.1632529712219; Fri, 24 Sep 2021 17:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632529712; cv=none; d=google.com; s=arc-20160816; b=PcBNaaeNoJClazaQoGQ1awxjgbDolxZGpk0ZDC9ZV2jW0C+EV7WWglFH2/9S8Ubyqw 5iZK4EXwUVa1EEgeo46hJgKHL1hypbL/ZG6ynEcmhRF1iMiX7w5W8TBuByt/F4qbx6N8 Q/NMaeRZsnJ2h2ibGeIkGRm0FJUJcbpiNbUktZfx3QHat+8mOxY2f5rzF0Yv2RlonlCz rGavh5bQd7N8zey5IQWOJOkIZk9Erph89kV2RTW8ETpzowJZbaxRxgkJcfGPOun68JrM g/A0batasraF8Anb3UJeCd/nCHMp5rNw6KfgIjTO5uk6zjqc2SFRqZ7yVqXHV+xHw+WF f8KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=1OdrmkHjMF6d1sAjVZI/wrUoP6X1SKK4L0IBPaRXPrA=; b=B4y2agqPYx726vNHXUBNLg34oki7Q/h2+eFJwZF2QCcMQTJGpyUDatAq26DpwBAxGS P1ZICZdWI41VM/JyyWOp1ef4A+og69bPFAFEkoiY6FQOyhUD5IBehXDDq6BERCHi4WI8 pYFdluEO+ogDwZyIqXws2a4K2kPPVcx0k4SPORSwI0xyW97HeWv5ovKEMwAsnENW0kdP P3/ZJDfcs92Da/VEGYcVw0BnMGy33fvp5R+ve3RTfj3P2SC/0mlm6WScjk0b33MSz3Qf 5VV5cbSK7DT2RdJjHUo9NBIfT12+VT+T01o/JFyl2cfptokTmoT+PYAxVqj2M1PXPWnD t2ig== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 14si9541867ejf.611.2021.09.24.17.28.07; Fri, 24 Sep 2021 17:28:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346466AbhIXN6N (ORCPT + 99 others); Fri, 24 Sep 2021 09:58:13 -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 >