Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6101527rdb; Mon, 18 Sep 2023 04:29:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFePRMORGf13wY44Db2RofNHUQuvjUpFzzVkgHqVQVMAOshnX5g91DGIHde/7dqUfEXV/dj X-Received: by 2002:a17:90b:1e44:b0:263:f630:228f with SMTP id pi4-20020a17090b1e4400b00263f630228fmr8802554pjb.23.1695036539765; Mon, 18 Sep 2023 04:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695036539; cv=none; d=google.com; s=arc-20160816; b=ZouMIXsd8bQ6M8XA+pssJuYfiqbC8O/xaryVzVyJ1SOZ4s4tfWCi1hqjV0x4RdaQRq nK2/jDq7dxliU/fVeZZq0eTqVAHbO4zFJsg29a0xB1pdaajbX410BiIIbyAnsgPNJwz+ DlXnDOS/+MiY91bpd9zq1khYmGbTFzRUcdMtwpP1v2QbVqi35L2GO9hXx8s8Yy0FCLK0 GcxNF+bBKuSeWSXzyxha9n8iKJ++GtsyS0+yXgEIEomxUFNf3lGlK27sGQxZssP+px+u sbQRnSyjsYM7NIP2zwCGwEqVeslfOR9BufBjCKEB14+vNaPz3m6XBMQDm/ZwTW0GJC8e P2mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=Xzl9a66g7pjPllhlamZ/S+EbqRH3LDFAUh4B05GcB1Y=; fh=gmFjhev0xOvsUPDSwQJ6RYhlGTV/X/L2zQlmsu4YEHU=; b=pt2F0CAwzxaD9Fm2pUtwMkiwXl041Dn4x0joXD0L0kHfWp7eiRC8OI29Y0dFTG8Cv+ Ram4nguwaiBJYbm2Btzu0Up2djBFekmU0wk2nbLOXIZfWOzGy7XYAImyHqoETGAjW42j eR5HDyekS3wJT1t00kRqXOwZsgms7Bb6usnkVjY0PSgrAewcQQlnPSQwY30+chMzfjpK VLYS/SP9DpU978x10Tw3AxYqEhlhM+c4zI6qZrXwjMQ4ynGEbaFnIgs1WoIHYRbuFVl2 EAmXe38onCD+g5fwE3vx1lGxdSaI7dsgPHKfk9tcnEvNQveOEH8t8mCrz1t/IIpPwUEc 21Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cc5MVugx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id kk10-20020a17090b4a0a00b002683fd38fd4si8440228pjb.31.2023.09.18.04.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 04:28:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cc5MVugx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3C5D1807F4B5; Mon, 18 Sep 2023 04:12:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241202AbjIRLLy (ORCPT + 99 others); Mon, 18 Sep 2023 07:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241474AbjIRLL3 (ORCPT ); Mon, 18 Sep 2023 07:11:29 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4204D120 for ; Mon, 18 Sep 2023 04:11:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D73AFC433CA; Mon, 18 Sep 2023 11:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695035476; bh=5hQycVA7KMCN6afk7MZOTflIs9jB3IHBfyU/PBD3Vw0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Cc5MVugx0gvApBnA/scg/hfHFLuLp3xtqfYxYW+4kY+za3Qasgre07vYRUajVKRBW +2UYLsLykm4ailOjA7eH9aPoZmmc6qqh96JKeDRm6n4vYhvDI1zELSEoPYLxgURk03 uSidZ2g24EokoYpS6jy0/Se21EAvOha9OA3Sv9xo44aqHVpxW7xvhdveF8UYIN4EMm 8bLLrqj5G7pegks4yanq1yn1VR3WKeTBsLNTct81OdGitOKi8wi4NT/BwPeFNut1mF JTNrtb7mSgUaLVPmODwGXCI/QgBg10uP1vaz4KfutCKNpOHJz05278c5Xv6FeNxutE WhlG4UQxceUPw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qiC9q-00Dw73-IM; Mon, 18 Sep 2023 12:11:14 +0100 Date: Mon, 18 Sep 2023 12:11:14 +0100 Message-ID: <864jjrenxp.wl-maz@kernel.org> From: Marc Zyngier To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: Initialize evtstrm after finalizing cpucaps In-Reply-To: <20230907133410.3817800-1-mark.rutland@arm.com> References: <20230907133410.3817800-1-mark.rutland@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 18 Sep 2023 04:12:39 -0700 (PDT) On Thu, 07 Sep 2023 14:34:10 +0100, 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 Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.