Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2020082lqb; Mon, 27 May 2024 05:32:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTtR2BV7oD5JuIH2xCdnnFBvewaq7tsEvZHwo+Ljf1aPqX0BlPd8+dTsyOn2Gya5YSxMQRlCV0ptysa3zla1d2/KGJrTkgTlHFFet06A== X-Google-Smtp-Source: AGHT+IEy2K4nsbZ5dQNKpMwkKllXvSqn0SuugNBT5wxU6UWvqUiVdttpADJb2d7MEvaCkqDet+yh X-Received: by 2002:a17:906:37d6:b0:a61:3dc6:3063 with SMTP id a640c23a62f3a-a6265118d27mr556204866b.69.1716813128572; Mon, 27 May 2024 05:32:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716813128; cv=pass; d=google.com; s=arc-20160816; b=pQCqg4UWmp/to31scRLwvswTaVFEzd5ooQOlp+fDid5Jq5m50HeUsiFenn4ppVlJkJ uD7jLBdC01g2rj2VZknA9QMGEFc4u3U3fu/fC8M+3eqY9SMdsReBvYFo1LehdlM4gjBy 3w1z5sPbEPjyDXyTWjgNz3VIRglRfr8l8HU85EaOqBqnNpEu3yXp7g+ZyteQtA+ge+lj iYiF9XPYo+Vc/qMsY7LvfnZEyc2hFFciaB7WHKt1tkJ8DMCscRSHAL9uZNP1PxIr07bo Ut9xToMM+uMXLhK9u6uwhu1JfqtzZ+mYBsmakExLWfIrzwlPOh5tHD2voLzGnWxL0KAB PPPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=XqjqewY/IWqR8PihupcnQhLFobAiXFGUHx0dGRIGDiE=; fh=pZ9rd3WWCoe9UynAHJePY55hVzdzNad3Gbd2FuNv1aM=; b=YosoOuKLb6AApjZJVcMIVxe97zD+qunt3Zg3TVQ8Sl4YS1Q8ifCyVyf/BBs21iBio9 zyPjRHUtqpVlMFfflQqif3WaxEqrYREwfySVYyHpy7MOrNZjEdMbjUyLM5frQBxSF6Ko K9xweB8V8CSFtlbNiTZ6asx05dND1OlwSCAKHfVesK3eL2YyfZqMLUCY5KXONZ/oU9dJ l9Etf+qX7K1zQ4vICpe0em8XT0lWi+qtKsJGh4ak6ptgbQXvwK8z8jIwt8QYGdL4ziMg MyErQAxNJlSUapWAVpOYWGMBZWWRkaHpVWhETP0P2KOQQMxqqFyeJKM8OGX61pSVEH8M 7ksA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rsIexbuJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c801084si383686466b.182.2024.05.27.05.32.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rsIexbuJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190584-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190584-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 44D1C1F2373B for ; Mon, 27 May 2024 12:32:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D48215E5AF; Mon, 27 May 2024 12:31:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rsIexbuJ" Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 143A113BC31 for ; Mon, 27 May 2024 12:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716813116; cv=none; b=hMuQKBD1NINyV3ayv+PbjxQddoOAhvvkwve+Dph91q+kKdRazrBywgsKw2NjSXjA3mqOumLUWM7HTB7j3NR2CXDI2yBD8HpuSVDMDZw9H+yDm6vaSDGnkX1EizKR6dxmWggzdokqrF7hTbCZl8cW9W/Z0cesZVkhZKfApBL2/bM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716813116; c=relaxed/simple; bh=Pg81kNExncHYgEH65vSq7ojtlVX7662uOZgf0mLJfUs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KQtaAC7+QOVZ4Rqfl69NEX+fK6BDrYklv0V/1/EkwE+ecGfqvrP2+8kL1LgBKsbWcR+yjKm0Bas9kcI4n/ej2Vgc/LqWZvKqedxgu2vEaPelCoZrl9gbsd4RgvUlcq3khf8Pnt/ejDzD2FUICCgz4WBGbh3+BDw6RDcIbwAS7QY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rsIexbuJ; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-354df3ee1a9so5225718f8f.1 for ; Mon, 27 May 2024 05:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716813113; x=1717417913; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XqjqewY/IWqR8PihupcnQhLFobAiXFGUHx0dGRIGDiE=; b=rsIexbuJjyNEa/dKDfM1aRwhZGAtmS5ZClYc1zegIOXlHOVE7QuNCoSsXSr7VRKRLw GefYKXyHyEZT8KCVRLzM5lwAJzgUPsHK8cSkLw+CiCOpM9ENBUe2SO7BZa8lOepAa1Qb I7EixgpxRQQ8Bd3elXEcs2Em9w6BDOe1WTni3iFb+6/0s6kKC7C5X700RjBURAm9XOGG PROYpSDrqWJU0fNXghfj4Lu0mbSHUKPlrLO6+rQSe/9Ury54n/n4WC5gVD5EJqiQtNb/ /VQ7WEI+oTW8xatO7yh9yFi6ACxFZbfTIripFQ5wBQD+E1t+18f183DrX3IO9ca4KbvK AYtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716813113; x=1717417913; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XqjqewY/IWqR8PihupcnQhLFobAiXFGUHx0dGRIGDiE=; b=D1Q0kUPNhjiBlfxZdrPEx19IFXBJEYRx2cPaUPIbkQ3jFAsHbOHZvjyniI5FXOrP2a 1CWch9TOvz9FMqGz+jGj2exQ7+7Sr4+Dpwwyxf1bZ3eQdTLZfjby1XyxR2SSWfU9nIOL 16Q4MTgmVM2UGyDIcJz8fT/vViX+/Pp2J/IZHZxsiH/eJw9aobqc0CylxcSlD3DD6t8W mXjD27z8oBcizzcf6NThFqEQA827ibiheB/8CaUM6jM/YKazPny1Ze0Nbzx5SPnoK4Gg GsgVQ5SEsHxQ3wzJlFAWXmnzV5Zl/nq870mSifZXK+EMq9DhPTmrBQ3mT6gAkhuQjACP GYOw== X-Forwarded-Encrypted: i=1; AJvYcCXLlwHYx8RI0n94S3BizjWm66Aqbl2Ro8ojdCJFJxZBI1+uilzCs9sQmJIDxRRESDYnnSXbPMTMUrXC2ExhzuX1UXeaPVCypVwD6FQs X-Gm-Message-State: AOJu0Yz31Fiwh1j+v4Gl2iFB/3YIxfePsEYimOr4Y61biCTxHLTz4Zjy UTaEqVaSLJ1Y5QN3vMBB6T56IloBQg84JlNU0pDl3cDuLAWitqwS7epf9Mx2S+stMmgV9K//RQu Rp34= X-Received: by 2002:adf:f801:0:b0:354:eb62:3653 with SMTP id ffacd0b85a97d-3552fdc8090mr6257038f8f.53.1716813092584; Mon, 27 May 2024 05:31:32 -0700 (PDT) Received: from [192.168.69.100] ([176.176.152.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-356c8daef27sm6814638f8f.115.2024.05.27.05.31.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 May 2024 05:31:32 -0700 (PDT) Message-ID: <06b06b65-8eb7-43f6-8fb5-e5663876edb5@linaro.org> Date: Mon, 27 May 2024 14:31:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 08/14] clocksource: mips-gic-timer: Enable counter when CPUs start To: Aleksandar Rikalo , Thomas Bogendoerfer Cc: Aleksandar Rikalo , Chao-ying Fu , Daniel Lezcano , Geert Uytterhoeven , Greg Ungerer , Hauke Mehrtens , Ilya Lipnitskiy , Jiaxun Yang , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Marc Zyngier , Paul Burton , Peter Zijlstra , Serge Semin , Thomas Gleixner , Tiezhu Yang References: <20240511104341.151550-1-aleksandar.rikalo@syrmia.com> <20240511104341.151550-9-aleksandar.rikalo@syrmia.com> Content-Language: en-US From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: <20240511104341.151550-9-aleksandar.rikalo@syrmia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 11/5/24 12:43, Aleksandar Rikalo wrote: > From: Paul Burton > > In multi-cluster MIPS I6500 systems we have a GIC in each cluster, each > with its own counter. When a cluster powers up the counter will be > stopped, with the COUNTSTOP bit set in the GIC_CONFIG register. > > In single cluster systems it has been fine for us to clear COUNTSTOP > once in gic_clocksource_of_init() in order to start the counter, since > with only one cluster we know that we won't be resetting that cluster's > GIC at any point (ignoring suspend/resume cycles which would need to > handle clearing COUNTSTOP in the resume path). Once we support > multi-cluster systems this will only have started the counter in the > boot cluster, and any CPUs in other clusters will find their counter > stopped which will break the GIC clock_event_device. > > Resolve this by having CPUs clear the COUNTSTOP bit when they come > online, using the existing gic_starting_cpu() CPU hotplug callback. This > will allow CPUs in secondary clusters to ensure that the cluster's GIC > counter is running as expected. > > Signed-off-by: Paul Burton > Signed-off-by: Chao-ying Fu > Signed-off-by: Dragan Mladjenovic > Signed-off-by: Aleksandar Rikalo > --- > drivers/clocksource/mips-gic-timer.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé