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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4B0BAC433EF for ; Thu, 17 Mar 2022 07:20:24 +0000 (UTC) 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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e0o4N4nsjyDSZT1VNh+JVmzk5BA8XJtHZELlEPPiDss=; b=M5k05X6D7ih2N0 CdpU+/LyGdmIDyFyW3phpjuihqv+ox5BtO2NmHFLsyY17yNYrWKznKS1iWkLTwK4h77BvPM5eb2Ot TX9/1Ud9HjvxKW2nNvNSTtd2rbg8maEnIsSDBbNHF9z5NgrGiVx9IY6xkXWB0/rDgJkTu+wGOTSi+ 8C7LfFJomuQovnhWqi06LluvkR0lKj6PC8vlw82b4OAmPoGuwQLMmizrq0NGNvNv7ycqXcMyvE1am h8WRE1/YrFXBZXuYOllFgAp/2lcn5liRK4//b6QTpOFcmBpjREx8wVHyo/p4dlC6An3QwKDo0NkFe fedFFAy0Z/cLcL2eeLGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUkPW-00F8JU-AK; Thu, 17 Mar 2022 07:19:02 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUkPR-00F8HT-Ro for linux-arm-kernel@lists.infradead.org; Thu, 17 Mar 2022 07:18:59 +0000 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C190C3F32D for ; Thu, 17 Mar 2022 07:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1647501526; bh=ScsU2sC70svMEwiZ9pPSBhbAgDMaMBHGkqomDLPaWvY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RB1KSL5lu/CAXs/0tInx6FBQ858toVexeyk5ZFTC+fySAXLEzwmjQok/ziixnk+Pe Lex3x44GEFqxGDeq9ozwL9UQhWRhnb0g3puzxvKVMk1n+SRU2d/6yuQ6B48rwxbGpl qJ7zcUyGDC6/EUmwrRrLr2OCxdf6coOpLtb76OxoyuqjSHIiJnVr/gQbH93I/XfOtz tus0aInIR52XnhAjdmZDrPuq9zXNKe9hZ4ZCKifEnII1kvXxqwKgsOshhDYi9LsOQ4 dvq6RT1XIdIkcdz6eNBUQtruAow0fecA6xPxXvpW7b9PFMIlJUGuTnYoOeI7ipzQzK Qlv/zRXbj9Jmw== Received: by mail-wr1-f71.google.com with SMTP id e6-20020a5d4e86000000b001f045d4a962so1241154wru.21 for ; Thu, 17 Mar 2022 00:18:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ScsU2sC70svMEwiZ9pPSBhbAgDMaMBHGkqomDLPaWvY=; b=moyvLyDch0Ix7TnSI0ZH/iiSXDMhmA9V7W1JUa92rBQbgxSDN1x1Q4E39ZNUINx8kq hGkRqqPDIwQ6I7xEfPpOgeSpfuYfbiYvAkZMhgZX2M9RB5fJJsTOszbAmyfly3aHYKe4 TFIsn6iNespRC3GnMg/uJx/Fx9IetV1bKHV+kR5/hZ/fkJb9iqGO2DLDIdCG88qVymiD JVOExCXACGLHIvYQPK9jafIAIM7V3SH07GaFGh+tIyTckOhoDa33W09VMmMQ9evruTrM agQR07EGFqQmm5lVj8PX4Wd41Kbz4zjZGdyuxOugjQ6eQ2T/X+03jVoGFgdRakrVWUSA VbfQ== X-Gm-Message-State: AOAM5333glWj3j6ZGo+xlZtza0s1kz+MbRE6nrV7aJe1UGIFKjG1ByRN dYD9Wkw3twOYmvYYP+j2zKtxWIsk08J7NVuQaZ0eXS8zIkQvy909YeB+aRq+Rmizk10sLbUTy4t Y+XIGSv1v4SGRg8ElGD/V9za4KtepuJlGle1vfTJm/waeqEXg59qC X-Received: by 2002:a5d:6d83:0:b0:203:6a0e:8854 with SMTP id l3-20020a5d6d83000000b002036a0e8854mr2692871wrs.259.1647501526409; Thu, 17 Mar 2022 00:18:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytsSOdD01cQjALk7690n3GvJebKeuAROT9DhRnjhAcswV0RIc5s795EBWkfXBcW8ftjHt4ZQ== X-Received: by 2002:a5d:6d83:0:b0:203:6a0e:8854 with SMTP id l3-20020a5d6d83000000b002036a0e8854mr2692857wrs.259.1647501526195; Thu, 17 Mar 2022 00:18:46 -0700 (PDT) Received: from [192.168.0.17] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.googlemail.com with ESMTPSA id v8-20020a1cf708000000b0034d7b5f2da0sm3478857wmh.33.2022.03.17.00.18.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Mar 2022 00:18:45 -0700 (PDT) Message-ID: <726bde76-d792-febf-d364-6eedeb748c3b@canonical.com> Date: Thu, 17 Mar 2022 08:18:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 3/3] clocksource: arch_timer: Add arm,cortex-a7/15-timer in of_match list Content-Language: en-US To: Kuldeep Singh , Marc Zyngier Cc: Marc Zyngier , Mark Rutland , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org References: <20220316095433.20225-1-singh.kuldeep87k@gmail.com> <20220316095433.20225-4-singh.kuldeep87k@gmail.com> <20220316174108.GB21737@9a2d8922b8f1> <87zglpybzw.wl-maz@kernel.org> <20220317065925.GA9158@9a2d8922b8f1> From: Krzysztof Kozlowski In-Reply-To: <20220317065925.GA9158@9a2d8922b8f1> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_001858_047901_81DEF731 X-CRM114-Status: GOOD ( 30.40 ) 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 17/03/2022 07:59, Kuldeep Singh wrote: > On Wed, Mar 16, 2022 at 06:43:15PM +0000, Marc Zyngier wrote: >> 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. >> > > Thanks Marc for sharing knowledge. This was indeed helpful. > To sum up from what I understood, bindings and DTs should always be in > sync and driver file may not need to define all compatible entries as > long as purpose is served. > > This means no driver change will be required to address > "arm,cortex-a7-timer". To which I have a question to Krzysztof. > > Hi Krzysztof, > > As per your comments on 2/3 patch, that it's DT which is not aligned > with binding w.r.t arm,cortex-a7-timer. > > What makes "arm,cortex-a7-timer" an invalid entry from binding > perspective when we have a similar entry "arm,cortex-a15-timer" already > present? > > I think we should share some common grounds here and keep both of them > in bindings or remove them altogether. I prefer first option, What's > your say? In this case the compatible should be added, just please explain it in the message. Your previous commit msg was saying about disastrous backward compatibility issue which so far does not exist here. It's simply more detailed compatible. There were few other cases where more detailed compatible was actually unwanted, so that's why each case should be analyzed. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel