From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964817AbbKDJqz (ORCPT ); Wed, 4 Nov 2015 04:46:55 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:33200 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932303AbbKDJqw (ORCPT ); Wed, 4 Nov 2015 04:46:52 -0500 Subject: Re: [PATCH v2 0/3] let Marvell Berlin SoCs make use of the best delay timer To: Jisheng Zhang , tglx@linutronix.de, linux@arm.linux.org.uk, arnd@arndb.de References: <1446560917-6318-1-git-send-email-jszhang@marvell.com> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Daniel Lezcano Message-ID: <5639D409.1030302@linaro.org> Date: Wed, 4 Nov 2015 10:46:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1446560917-6318-1-git-send-email-jszhang@marvell.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2015 03:28 PM, Jisheng Zhang wrote: > In case there are several possible delay timers, we purely base the > selection on the frequency, which is suboptimal in some cases. Take > one Marvell Berlin platform for example: we have arch timer and dw-apb > timer. The arch timer freq is 25MHZ while the dw-apb timer freq is > 100MHZ, current selection would choose the dw-apb timer. But the dw > apb timer is on the APB bus while arch timer sits in CPU, the cost > of accessing the apb timer is higher than the arch timer. > > This series firstly modifies register_current_timer_delay() to choose > the highest rating delay timer: use the rating as a primary indication > and fall back to comparing the frequency if the rating is not set or > the same. Then we set the arch_delay_timer rating as 400, finally > Implement ARM delay timer for the dw_apb_timer and set its rating as 300. Hi Jisheng, Arnd, I don't feel comfortable with the rating / freq think. I am afraid this approach based on heuristic will bring a lot of complexity and workarounds in the code for a small benefit. Why don't we define a DT entry for the delay timer ? So we delegate the choice to the platform DT definition. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog