Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp973671pxp; Wed, 16 Mar 2022 23:08:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPLBlNq2OcGqDCizmK8WhLpy4Rm7/E7/8cHciEH/4oGigfYHjm5UVAt+Bigd3Le+jSM0bj X-Received: by 2002:a17:90a:e7cd:b0:1bf:2ab7:1a9a with SMTP id kb13-20020a17090ae7cd00b001bf2ab71a9amr3573410pjb.138.1647497280248; Wed, 16 Mar 2022 23:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647497280; cv=none; d=google.com; s=arc-20160816; b=nWDlRMpv6FapvrYutycSo2RYtRmlOlc1WGgfZCvGZNHFnT9Q4snF5PfR5AXnpW+YTw h56mWCQ+SXWz22N7jGMoYu7CQxVXO14bOs3fHaskgvXg84nQFau/V4Zt5T7qLiDEtBbl OfNOyPiRoSNV+vSYVvwbx3rohFTJOcNFomI16E1i55jMSqeB/rt8f8csrtj+i17r9DC5 SDwSaZLN0LNoTVTTUQHsyljcWwvBlwXF/0sRWJcy58tYNYWKoyoRcW/h9EbuB+D/avZ7 la0gGY1fFxSCqzIH07YcP6YwgjNdKWQvjzoNX3GQdDJN6zBI1JXeuZiPSxYQKEQ4W+BR 775Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=0MZ19GYgwkfK4w988NYx5q8r/V231eLi7Gyrsd1wg2s=; b=afciOdNetNaRsGZ3e7ANzvuq3SaY/c3HImWxf70+VnM9xIxeqPOy1C9lZWtDD4tyNs otQeXZkN3RAHNF9DZ9FhcJySLk7WTL1zEvaPRyiKHlT9zNBWp2mrA1Zp/CdmlOG+OOQK TCc9Q9CrWO178IcJr84CcWt8EouyX107IJcbaTL7b+MNukHR4B9z8Tv+Nm75AJvc7RdH mTlfOZGwxrqlaJzzRq0CYhKQxMRvTPAMB3Vbde5ygaobeyWMK7BBsbo5hbgy7xIeVrWu cMC1g7ZC0F/X6xqxVUpu1syJQ2FR4/oBtXrdF7y+mZjFBiJ818YHWMuXbsKm+88sxeuZ rv9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9KOGm8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j12-20020a170903024c00b00153853d2333si4262432plh.118.2022.03.16.23.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9KOGm8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C74C258FD0; Wed, 16 Mar 2022 22:17:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351054AbiCPSog (ORCPT + 99 others); Wed, 16 Mar 2022 14:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbiCPSof (ORCPT ); Wed, 16 Mar 2022 14:44:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AB561A399; Wed, 16 Mar 2022 11:43:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D032F618D8; Wed, 16 Mar 2022 18:43:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38E17C340EC; Wed, 16 Mar 2022 18:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647456198; bh=zxan7oI6HzOes/8slMJMg07NkfXBKCEK3oWvQY50vIg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=C9KOGm8o1BSR2ScxflZfIXFzZOrl2eL0qH8oPxxjwwivLvJ0h8vE3DRfCpCfgP2eq Up6lRopzhd8iHOmU9ihT4WR3g2W0GeGxBAAHEdxVXI8CGOWCGY0ZxW6SY95msAAxKt 1I2NtJfaUSGcmPcEq0QRoeXZ+VJXxf21Z2AVBAZ8Jnqy69MYpC0HPCMonbmM4F8KTn LFbzgPYzcCe+7mdMgXJdrF0YdAqRHmlCsdkXOAIfxY+gE68832FCajMnjpTs4ZZZEv J3s3+96qSSdgB16FZBzn8wfJdosSfZVfvmjTRpovw2KDzKgN609J8895GoSFnIvyfI ffPZs0MW6N4fA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nUYc7-00EzhB-TM; Wed, 16 Mar 2022 18:43:15 +0000 Date: Wed, 16 Mar 2022 18:43:15 +0000 Message-ID: <87zglpybzw.wl-maz@kernel.org> From: Marc Zyngier To: Kuldeep Singh Cc: Krzysztof Kozlowski , Marc Zyngier , Mark Rutland , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH 3/3] clocksource: arch_timer: Add arm,cortex-a7/15-timer in of_match list In-Reply-To: <20220316174108.GB21737@9a2d8922b8f1> References: <20220316095433.20225-1-singh.kuldeep87k@gmail.com> <20220316095433.20225-4-singh.kuldeep87k@gmail.com> <20220316174108.GB21737@9a2d8922b8f1> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: singh.kuldeep87k@gmail.com, krzysztof.kozlowski@canonical.com, marc.zyngier@arm.com, mark.rutland@arm.com, daniel.lezcano@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Mar 2022 17:41:08 +0000, Kuldeep Singh wrote: > > On Wed, Mar 16, 2022 at 05:30:26PM +0100, Krzysztof Kozlowski wrote: > > On 16/03/2022 10:54, Kuldeep Singh wrote: > > > Few platforms such as Renesas RZ/N1D, Calxeda, Alpine etc. are using > > > arm,cortex-a15-timer and arm,cortex-a7-timer entries in conjugation with > > > arm,armv7-timer which are not currently defined in driver file. Add > > > these entries in arch_timer_of_match list to bring them in use. > > > > > > > This looks wrong (also Marc pointed this out) and rationale is not > > sufficient. Why do you need these compatibles in the driver? > > Hi Krzysztof and Marc, > > I find myself in trouble whenever dealing with compatible entries and > had 2 options when I stumble this issue. > 1. Remove unused compatible That'd be silly. > 2. Add required compatible to binding and driver To the binding, yes. But to the driver? > My past experience and advise from other developer says not to remove an > existing compatible. And also I found "arm,cortex-a15-timer" in binding > which was again not documented and was present in DT. This prompted me > to go for second option and make necessary additions in binding and > driver following current entries. The "arm,cortex-a15-timer" compatible is documentation, and only that. If, one day, we find a bug in this implementation, we could work around it in the driver thanks to the separate compatible (although in this case, we'd have much better way of doing that). > As per your perspective, current configuration isn't apt which means > "arm,cortex-a15-timer" is a stub and is wrongly present in binding. That's not what I said. This compatible string is perfectly fine, and accurately describe the HW. The driver doesn't need to know about the fine details of the implementation, and is perfectly happy with the current state of things. Think of it as an instance of a class. The driver doesn't need to know the instance, only that it is a certain class. > I also observed many other DTs have compatibles which are not present in > driver. What is an ideal idealogy behind such cases? I think I've made myself clear above. Thanks, M. -- Without deviation from the norm, progress is not possible.