Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp657659rdg; Wed, 11 Oct 2023 01:31:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERjyXKL8Ji+sQkgZc4c4lRBlUm/g114dqT63zOBq2NSccH4n4GkO5FsQ5HCdQnLEDShfjC X-Received: by 2002:a17:90b:78e:b0:276:78f2:5d31 with SMTP id l14-20020a17090b078e00b0027678f25d31mr26933458pjz.21.1697013087071; Wed, 11 Oct 2023 01:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697013087; cv=none; d=google.com; s=arc-20160816; b=Gtj2AFCV21wAI7y3cs41UU57JCOVWz6xKXqbLmxwyfU3XazJks8Q+vEr10YbHQr1dK 4ft32B2vjdLkZ45LCP6tKjwfeO/4xkErX1fLGWM66uoXLsGOi2lq+MPSZoJ22hHpTkVQ VPrSIpk3RyuZkwB9TxLDKteJq2x5pB4jjVeZIMLCggqDronrO0sepK0bHKMTx5OUyWVz V/c2OUc6OtKts3OJate/FMdAGs1d2VOvFNx1Cqdcou10+9+ro5SXiPxfWE6UarkmpJBM DiCtKHGWKGfXVdaNYs30JiQ3C3jiq/ze2EcCqiUoT57KzYg+rqlknVOE2yu682v2PoLh 669A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Q89QYEKjqqOkXqmFwAemha7CMh3b6/u3A5jv/kKqyco=; fh=oWd2ZJXkRODi9SsaFYDS7YXsi/0uxpR0JeaJd4JfimY=; b=Agr/i3KzQ9s1BzzZRTs70VzFt3C+HOsaZ5SO6Qqd+grT3Po0y8AZDFtJZonkZjCizu t+nt5IFRQpoXil2b6ZE//3jaG62lLV9AQ5M4O3WWxjic0YJn11MdB5k9QiV7E+laKPUP kNEVqD74qfmnbJi2NeUYje1L9OUBvCbt9H26Mx6GiR1Qczw6ndTNgi6N/+zHdICfB0nr drN/z4CoeiXVBKH5qXr/U3F98igaN2YVuM4Uuq9mbwkBr94NBhsWdWCkiRBejEqYAp5f DKbkWoXHzfFFeCZYeMWeC0EM2cZFwyAKM+2ShBLDb4H6H04PNG4lfu3yV/ORH1rj4P0l 3ftQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xAyM2udP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j11-20020a17090a31cb00b0027d0ba6f5ecsi380030pjf.149.2023.10.11.01.31.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 01:31:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xAyM2udP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B29918023913; Wed, 11 Oct 2023 01:31:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbjJKIao (ORCPT + 99 others); Wed, 11 Oct 2023 04:30:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbjJKIan (ORCPT ); Wed, 11 Oct 2023 04:30:43 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B606BAF for ; Wed, 11 Oct 2023 01:30:41 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-406618d0992so63217535e9.0 for ; Wed, 11 Oct 2023 01:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697013040; x=1697617840; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Q89QYEKjqqOkXqmFwAemha7CMh3b6/u3A5jv/kKqyco=; b=xAyM2udP+76S0R2tHE2+PDrLlP0UdXRhNb2Sm4OrmAYWds9uTRRKyN2lhuZ21ZMj+a ZNqp5Zewle7LKAERhEhdtd73Njx+hJlnElbiIs9NIfXiLAOv/oldlahTvlwqnluoT39q cTvS2aUK5/0GlYmsiPlKCCRd0Z+OYS04xbacgNCYfTBz7H4WX10iK6ZrMBAKX/CoNwyh 9LSOSMwDWANrR8szzHZq5bjM/dum4MKJ+k9kkOboTgTw4rxg+Q/qQ/pz58oOP0XLJd8Q S92UpF63KgEZ6eN5QDACIvpqwYm2dyJxuvadkD2zwcbUGSAhh+hwuwTZjxs+irEOqtE/ Mntg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697013040; x=1697617840; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Q89QYEKjqqOkXqmFwAemha7CMh3b6/u3A5jv/kKqyco=; b=YZtJZTeMDEaHZ9o2SZdVfHNgF2GYb4xffBHLgFhBEONeZ/cZVz2SL7PPEe5qjlC8+o iRqi07MJLS66ROMogqQ4EQhY0BRPg8Ra4WAeuoJgz+QoLS5xqy1BLN/INjmbqcGIniPa zJTFgeCidGniJjMS5TtYZ/D0+T5FqpjcDj4Th0HLhu1jdRxoSiTsichi1f0lMS3CHY2M j6wF4u7E9+kyjQOuEKjkRna3+zW2NYxV1Z87PGTp5BJiMbrQbjo6YxEDjSOZPcudwhj2 YzP51jDf9Rv9NQ5JzIXQJABIpmb3QX5qoirV45tTY7A1zOg/L3O9NyvtoXjQNcjEnA8g QwXQ== X-Gm-Message-State: AOJu0Ywcrh/39T6XYvgrAzulTgcNAOVpX1YbOR3HiFnBbdhIchmue8Wa j7K7Jg7ajuypjYyBRX5e15IQgg== X-Received: by 2002:a7b:c5c9:0:b0:403:272:4414 with SMTP id n9-20020a7bc5c9000000b0040302724414mr17978269wmk.0.1697013040063; Wed, 11 Oct 2023 01:30:40 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:de95:eca9:6b1e:b330? ([2a05:6e02:1041:c10:de95:eca9:6b1e:b330]) by smtp.googlemail.com with ESMTPSA id 11-20020a05600c230b00b004053a6b8c41sm16036062wmo.12.2023.10.11.01.30.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Oct 2023 01:30:39 -0700 (PDT) Message-ID: Date: Wed, 11 Oct 2023 10:30:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: Initialize evtstrm after finalizing cpucaps Content-Language: en-US To: Mark Rutland , linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, maz@kernel.org, tglx@linutronix.de References: <20230907133410.3817800-1-mark.rutland@arm.com> From: Daniel Lezcano In-Reply-To: <20230907133410.3817800-1-mark.rutland@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 11 Oct 2023 01:31:21 -0700 (PDT) X-Spam-Level: ** On 07/09/2023 15:34, Mark Rutland wrote: > We attempt to initialize each CPU's arch_timer event stream in > arch_timer_evtstrm_enable(), which we call from the > arch_timer_starting_cpu() cpu hotplug callback which is registered early > in boot. As this is registered before we initialize the system cpucaps, > the test for ARM64_HAS_ECV will always be false for CPUs present at boot > time, and will only be taken into account for CPUs onlined late > (including those which are hotplugged out and in again). > > Due to this, CPUs present and boot time may not use the intended divider > and scale factor to generate the event stream, and may differ from other > CPUs. > > Correct this by only initializing the event stream after cpucaps have been > finalized, registering a separate CPU hotplug callback for the event stream > configuration. Since the caps must be finalized by this point, use > spus_have_final_cap() to verify this. > > Signed-off-by: Mark Rutland > Cc: Daniel Lezcano > Cc: Marc Zyngier > Cc: Thomas Gleixner > --- Applied thanks -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog