From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107AbbKCIuL (ORCPT ); Tue, 3 Nov 2015 03:50:11 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:62106 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbbKCIuH (ORCPT ); Tue, 3 Nov 2015 03:50:07 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Jisheng Zhang , Daniel Lezcano , tglx@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clocksource: dw_apb_timer_of: support timer-based delay Date: Tue, 03 Nov 2015 09:49:32 +0100 Message-ID: <6198599.NHtefZl19R@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151103145940.18ab648f@xhacker> References: <1446193659-1698-1-git-send-email-jszhang@marvell.com> <5909853.Bs72yAP0HH@wuerfel> <20151103145940.18ab648f@xhacker> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:nOlSqZeyvVvAJs/h9sc2GuoRKaxvwJBO+VFQWHcIBuOxq1LIOGm 3ETNipD4AHQ8umrd17ZbbXBmeAU6MMl+/i2+avDK4xZgdfGDYFVaRKnnbhFPkUv5GNtudme 9wol3FG45MrcGngAS4evBw4G87XhwhaAUkJV8Y3sMZGkdtTsPjJmeONbf7G1gOhQQWqPbzD 1WEuTDbvpbieRKFa4GSTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:zm0UXh+wfTM=:YKJm6i+Vi7LQq5WzbQO6mb A6OM3XKExl072FN7gWvbhNOICbb1dXpM+1I8ivOOKREBQiAHZtU7CbW0l/x7zI9mLLKr1vH9i L4C9tmVB3M9V/1IIpwCvbpzA5fzeEjIq4g0mqFP+W5Xez/KGqdVauJqqhWTOqAayjhpGe7IX0 Mjs4RqfKL5cSepvQIUbL1iPPDJo6NnZNxt7Z08rRJbtv8MG6FTgMeMO6338RqbIBDiRZ34eql 3dlcap8JCPtHcakO4uRv9aVoFXUGGUOzTkPzQCKZRbL7KcQX0Y7mbvqsjAWOoD2Sv2X6C9loO iUHIcewV9EviFOAbj4QtVlQ3whyRU+ijlrsUx6w96UdvBqQbl7s5S5yF8m+ZNWsZw4pCgeG9K YbeTWGSvtX/rAQWlwE7QaWt2K7mBi3TpXyMj2gCUGQqpBb0TaDlg7qK+5Vo8FMV26ylLCjGGA uGnOylnZ0tlpTbWBqcgZnCx99Iy9Bxm7/5EMTkf+O9g5d0w6OGUzSc7rvHcaJ8+TKF5oi9Bro ft4V54EOsda9+dzP4wEOaQzmSu5PTC2OXV96fswzATnAdvFghPdvbvhDusdePZKHlkdpAjf8n D2gxU+09EPdNOhBPmIVAPtTxDl9+/G0bbw8jz0k0NiePMKl6/e9++KLZpsLxDL6nVNjdIdMja xlGGnWjFk4j8Qc3yTJtYx1SGT6wzrDw1O7WdDb6lAPHu4ZmiOsEf0zeSQp3ZmrZhcG+zmQtOx tlCzEyzOpGuFIKvw Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 03 November 2015 14:59:40 Jisheng Zhang wrote: > > On Monday 02 November 2015 11:03:34 Jisheng Zhang wrote: > > > On Fri, 30 Oct 2015 13:42:01 +0100 Arnd Bergmann wrote: > > I'd be happier with a solution that keeps the DT describing the hardware > > and not the way we expect Linux to use it, and instead has some heuristic > > in the selection of the delay timer. At the moment, we purely base this > > on the frequency, which as you say is suboptimal. > > > > One possible way to improve this would be to add an optional 'latency' > > property to the DT nodes (or the driver), and use a combination of latency > > and resolution to make the decision. > > Got it. Thanks for the suggestions. The 'latency' here seems a 'rating' > similar as the one in clocksource. I will cook a series for review: > > patch 1 to make register_current_timer_delay() aware of 'rating' > > patch 2 to set rating of arch timer as 400 > > patch 3 to add timer based delay support to dw_apb_timer whose rating is 300 Ok. Just to make sure I got this right: your plan is to use the existing 'rating' setting as a primary indication, and fall back to comparing the frequency if the rating is the same? Arnd