Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5943587ybv; Wed, 12 Feb 2020 03:13:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzxW6RKH9/lh8K6lTJ1saGVf9ek5o79mJuJO5dtGZPI1JEksP6WznTjZQAcYA3+i4NyvF5i X-Received: by 2002:a54:4707:: with SMTP id k7mr5582185oik.153.1581505994757; Wed, 12 Feb 2020 03:13:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581505994; cv=none; d=google.com; s=arc-20160816; b=Wvx+F6VjCmNItjhkxI/5sPUy6WulcbVJy/IDlTyQJviS6tsQXNpvn217uXFzSexP6I 3HSPb+KSgDpPQtySRy9G2BdMkY6efjHCbxUGoK5XGEqkGOSlGKhQmL+6L+ND1PIi2JKL KiffX1pNp73C2m5qzHt/QNiO4siEZwUFYKw8+CMWXZQFt8Ugi/rgLWQMHRGSuJ6ccr/1 XZzcbnH86thY9yAVpIC7PrpsDR1bCd40KMEi53jiwE5LydDbv95tOzRgdaTCpNBrDoHZ H1SkP7MQIIErGtzwMN1GCDsxG3wO8XryhJ2t8BOjjkj4cbHgEe4tIukF+9wwyOq0ry9w sb7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5QzK4bYtglHGx71lwxZaf/rI9ZjoU3iNZNp+9a2+P1o=; b=I9SC4xpnchzrHNHa5KO37dyjdsrEvjJwukkk5Yis9GyqUXiu2RTbbjguwp9lSSCHVF yEHKl3cZl8EAI8SldRYdGt9S6Owe1Dan90da6Xwb3pzkaCRPp5d2OvzXODH6OHqykIKL UZE3TYGVrRsXU2TJobkekpBALLm8mOFepvO8fQrkwv0XNYBv30gvaGn4jb0oJeCXzwki JBn9GiGsBOsR5mbI5N6ulNLjMB7CUQ5AayWY3vo+QrCMXKugwbm91BzYkklsShQw8hcB LmDa2LelshXNoTsjainPbGb/dF5aZWB0BhBFNjct2yGxzUMH9nR1/4gSpgpyCRiP7vwh NeYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17si61948otk.109.2020.02.12.03.13.01; Wed, 12 Feb 2020 03:13:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727691AbgBLLMi (ORCPT + 99 others); Wed, 12 Feb 2020 06:12:38 -0500 Received: from foss.arm.com ([217.140.110.172]:59362 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgBLLMh (ORCPT ); Wed, 12 Feb 2020 06:12:37 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D66230E; Wed, 12 Feb 2020 03:12:37 -0800 (PST) Received: from [10.1.194.46] (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E90E3F68F; Wed, 12 Feb 2020 03:12:34 -0800 (PST) Subject: Re: [PATCH v3 7/7] clocksource/drivers/arm_arch_timer: validate arch_timer_rate To: Lukasz Luba , Marc Zyngier Cc: Ionela Voinescu , catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, suzuki.poulose@arm.com, sudeep.holla@arm.com, rjw@rjwysocki.net, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, viresh.kumar@linaro.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20200211184542.29585-1-ionela.voinescu@arm.com> <20200211184542.29585-8-ionela.voinescu@arm.com> <89339501-5ee4-e871-3076-c8b02c6fbf6e@arm.com> <289c6110-b7ea-1d61-d795-551723263803@arm.com> From: Valentin Schneider Message-ID: Date: Wed, 12 Feb 2020 11:12:33 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <289c6110-b7ea-1d61-d795-551723263803@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/02/2020 10:55, Lukasz Luba wrote: >> Because, as the commit message outlines it, such a frequency is terribly >> out of spec? > > I don't see in the RM that < 1MHz is terribly out of spec. > 'Frequency > Increments at a fixed frequency, typically in the range 1-50MHz. > Can support one or more alternative operating modes in which it increments by larger amounts at a > lower frequency, typically for power-saving.' > > There is even an example how to operate at 20kHz and increment by 500. > > I don't know the code if it's supported, thought. > For that one case the value reported by CNTFRQ shouldn't change - it's still a timer that looks like is operating at 10MHz, but under the hood is doing bigger increments at lower freq. As I was trying to get to, this patch isn't validating the actual frequency the timer operates on, rather that whatever is reported by CNTFRQ is somewhat sane (which here means [1, 50]MHz, although we just check the lower bound). [...] >> And? It seems to address a potential issue where the time frequency >> is out of spec, and makes sure we don't end up with additional problems >> in the AMU code. > > This patch just prints warning, does not change anything in booting or > in any code related to AMU. > Right, but it should still be worth having - at least it shows up in dmesg, and when someone reports something fishy we get a hint that we can blame the hardware. >> >> On its own, it is perfectly sensible and could be merged as part of this >> series with my >> >> Acked-by: Marc Zyngier >> >>          M. > > Regards, > Lukasz