Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4441614pxf; Tue, 30 Mar 2021 07:57:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyGav/Yjoqkuq5npte1NfySv+V0zZ39ZNwk49w0EWvhHoGeQcHP5zzrx/p8AFo4/pqGViW X-Received: by 2002:aa7:d987:: with SMTP id u7mr33597924eds.326.1617116243075; Tue, 30 Mar 2021 07:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617116243; cv=none; d=google.com; s=arc-20160816; b=OO20mZeVBlJAuj4OroavjFkis7uhjU0h33C7Az7551GVlQNnvI9+jjLowzBoGvtjRi 7adF36EZSvmBRAlJLO0iVemueZSrQ7lW0cCwl+IHozVh/4RhOketJ8mY6HjBc7zSvEr2 YFenQviFaJryatS02ydZOhfU2dSQlb0VCYMtBruSsdqSVifie+Cvc89YoIeS4iAJVZqD lS7AZcfobgDwwUSDsX8NlcBgJS833wl2aXsy6jyis2DViU2O9wzMZVBuqVhXOQDNCQS6 SfA3QgVX4k1vJjr21KRJB9MITSprkBqjikzUwv2VN/h6ASwCzAoIV5t3rlDNW4Nfk5hn 0oGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VVnf39RCAPE3ZUlDU271q4z+SgsE4QbJ9q0UR/deTB0=; b=y66T4mLh5UAvK8CmuLuzyNJ4Kux+AL5vQFeg4Fz1Lq4TQyIeQkHA/kWhnAm3CFE2E+ QFZcSScGuzueMerdyw7xcPGX4kaIxnt8qCauOuX6GTnnc9gwYZud183ZFDxVnnlDdEc1 /U+HBBTc41tjpX7pgFyg1CqWWjRa6+vv5LwfW91mGx1XM4zKJ0rw2d+W28EHNbUc9Dt4 mJPCCiPqEUOp6BYslQOHIEP2ImOh9kLAe8CW96bSQJ1KpOvMHq0KQANuALQ27NvLVlpX 2c0eE2S/CvsVWEj/nH+N6htq+7NRvHXVb5ulzL0TEf7B1fO6elBHkh2ZVMRUvfHWM8FC IFXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si16734965ejg.555.2021.03.30.07.56.59; Tue, 30 Mar 2021 07:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232398AbhC3Oz3 (ORCPT + 99 others); Tue, 30 Mar 2021 10:55:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:55562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbhC3Oyw (ORCPT ); Tue, 30 Mar 2021 10:54:52 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96438619CE; Tue, 30 Mar 2021 14:54:49 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lRFlX-004hoo-UE; Tue, 30 Mar 2021 15:54:48 +0100 From: Marc Zyngier To: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, seanjc@google.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, Andre.Przywara@arm.com, steven.price@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, justin.he@arm.com, jianyong.wu@arm.com, kernel-team@android.com, Mark Rutland , Andre Przywara Subject: [PATCH v19 5/7] clocksource: Add clocksource id for arm arch counter Date: Tue, 30 Mar 2021 15:54:28 +0100 Message-Id: <20210330145430.996981-6-maz@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210330145430.996981-1-maz@kernel.org> References: <20210330145430.996981-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, seanjc@google.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, Andre.Przywara@arm.com, steven.price@arm.com, lorenzo.pieralisi@arm.com, sudeep.holla@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, justin.he@arm.com, jianyong.wu@arm.com, kernel-team@android.com, mark.rutland@arm.com, andre.przywara@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jianyong Wu Add clocksource id to the ARM generic counter so that it can be easily identified from callers such as ptp_kvm. Cc: Mark Rutland Reviewed-by: Andre Przywara Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-6-jianyong.wu@arm.com --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/linux/clocksource_ids.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index d0177824c518..8f12e223703f 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -191,6 +192,7 @@ static u64 arch_counter_read_cc(const struct cyclecounter *cc) static struct clocksource clocksource_counter = { .name = "arch_sys_counter", + .id = CSID_ARM_ARCH_COUNTER, .rating = 400, .read = arch_counter_read, .mask = CLOCKSOURCE_MASK(56), diff --git a/include/linux/clocksource_ids.h b/include/linux/clocksource_ids.h index 4d8e19e05328..16775d7d8f8d 100644 --- a/include/linux/clocksource_ids.h +++ b/include/linux/clocksource_ids.h @@ -5,6 +5,7 @@ /* Enum to give clocksources a unique identifier */ enum clocksource_ids { CSID_GENERIC = 0, + CSID_ARM_ARCH_COUNTER, CSID_MAX, }; -- 2.29.2