Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4957384rdb; Fri, 15 Sep 2023 19:10:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE54kOp0x2GAfbdiUT++Nmmjn5zGcBa3aSlmAC+EpCJZuQLr21RFYMem/LDlwA1ko8mpAIb X-Received: by 2002:a17:902:da88:b0:1bc:5e36:9ab4 with SMTP id j8-20020a170902da8800b001bc5e369ab4mr4756416plx.21.1694830241679; Fri, 15 Sep 2023 19:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694830241; cv=none; d=google.com; s=arc-20160816; b=uG2X8iOAW8yRM7n094Jl/6Heqnb1Scs2+djscbaR8ySEJkdXGCaqkLLhGEt8k8qR+0 i+FYCksnc+Hy0ol9D8REPq/9bHwt7n1fSLuaJnJfittdkAjgx1JsILlcb05i1BfKBaoB 3P7iqqH/7PChpTNNWNMZjHvIFyBzh3OI1MaWbA6x1V4pcUaZBM3lILKc7PZKNosUnIH+ Hz85Nn7ORZQoDZIkpId9d8DZKrBmGKRQ3HJtIdMif7epMCiT6UhcbdJrH7wZBN1rM7KI b/o5A1yXUlVkMzpfCbyNbfFPs6rx1qxSK4HAYqICPKvkHAYKI9NzTIcaiR3sx/leVGbx xUmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=rApaMJWzLfsSlXraIlDQUJyr3iLwzD00Wf6q05UQ0mU=; fh=LnsKDI/bz+GRJ7Gr9HiMOLz91hC1F6f8iWoV3AgzGC4=; b=UqUgHMud7kYNi6Kw+lnQQ/G5gsX6usI3jAaR7f/qyYcvRLs5awb2rwSASgpQ+rkU/b UyYyJU6MCUSUMwXGE3vV+UBrhqiapk9qH3m07hwE3zA8fgwUTB625mQQXQX+i82BDzvu D1sMXf5hdJE6pbrtmbTmLaZAqV2vX/nK3suGs7YIlAAiQN1GhpeRynlbN42KY/buelZZ kb2ZsTi+KoBttXEwcN93PaY1ibQdbuk8oExMpXdpwewlTMf1kApJIztGhSJzHfa+TkYR zTKALs44CX20TGRlapzwbVyj+oo5BozJzNOEnwDGHDE0gMmBt/rkyKE9/5uG7TSCCOQM mFtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=VhiEl6On; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=zrklfkJa; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id kl16-20020a170903075000b001bb7b3e607dsi4104473plb.21.2023.09.15.19.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:10:41 -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=@linutronix.de header.s=2020 header.b=VhiEl6On; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=zrklfkJa; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DA67D8027F24; Fri, 15 Sep 2023 12:15:10 -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 S236878AbjIOTOn (ORCPT + 99 others); Fri, 15 Sep 2023 15:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236983AbjIOTOd (ORCPT ); Fri, 15 Sep 2023 15:14:33 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C83BE210A for ; Fri, 15 Sep 2023 12:14:27 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694805266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rApaMJWzLfsSlXraIlDQUJyr3iLwzD00Wf6q05UQ0mU=; b=VhiEl6OnF7EIHZJ0155JYnZKmWWPicROKgPOGKFsPdTtv9NbdGHV8VraP4Mca4lP7phW2N CZZZBV6m5/Zz2JxbJkyLiAehLcg3EAcFt2KHLXHddKDutmId0xLaKuARM9DP6wt/PZSuP7 ANfnpr288k3QwRzKXizWXESSpthW1mT6PP+vDQs/42g3AfnU4zCDPOsJXkvDcGu3BEqc43 mih695uKck/ev/CrIfdNNipokd9r4vvkeYp+raKqmHhFzEZlrDD0OvzYEW+NyFM4hVj9EE hZ3MwbPLOJJiSz//MgIqhvD6yWnWThoO3yqiTPqJp73Bwj6zNJlbIF6xMmNrIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694805266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rApaMJWzLfsSlXraIlDQUJyr3iLwzD00Wf6q05UQ0mU=; b=zrklfkJaPaJbPwJMIOjo273uhLqrzHOFJz+YrfnWxTkKGqSo+SXcSSBLom1XvIN987uKZh p4o167PLO7Iz4NBg== To: Mark Rutland , linux-arm-kernel@lists.infradead.org Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, maz@kernel.org 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> Date: Fri, 15 Sep 2023 21:14:25 +0200 Message-ID: <87y1h7z1ta.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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]); Fri, 15 Sep 2023 12:15:11 -0700 (PDT) On Thu, Sep 07 2023 at 14: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 Acked-by: Thomas Gleixner