Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp462552ybt; Fri, 19 Jun 2020 06:09:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpVXDutzpdfRKY8WQa7e0kyJ8e7oXY99RrqIBK0CccOx4ju/DLkBtYPW5Gaw3z9M9xKetT X-Received: by 2002:a17:906:8488:: with SMTP id m8mr3758962ejx.236.1592572144561; Fri, 19 Jun 2020 06:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592572144; cv=none; d=google.com; s=arc-20160816; b=y1rr514PSHoZZ+Z6ERhK1c5wDLHBIG34H2dxudnWFQYJTwF/8/r6xVFrmUBN8lrg68 dRCrw1LcNxSuT2l8Dbfe3ImBjLw6bjSRxea2Eaq99AgMGS4pK8r72X5ilpFXSdICK7yz MJ2ZOrAb1/eZq9rfR2tYXv1d2lpPzlVrBYataPTyzeYIhTXjbafSyF45LSFwDMSkhjs5 o2DUOBFYTFLiwgJEX+w/21F81PkY9cbyJD38bgZSKxKqDFJyj9MuO2/ViWT+I7RlV7sw E4GtBQgMUQdVHpSJKgqaZXBRF4Bv04/DpreG0TvzOHRH6FhaGJyj6DbgA9qJJNnPVySe kA3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=KhOgISoIELWZttLBFThGqVp5/lr1YCuPG4TNKdS6c4g=; b=VvYm6CyjUNLHR5K6B+gv5wWMi8BC85QF4bEdVbw4cEwgg/epUgJSOa5lSYL0UVM201 5qCXfU0prmnZNNqxhrMLEkQZ63CJGdXXYBQ0NSJfyaLmeLiYEe9aglTDVcarO+/NC3+2 Qk8GvFOY0/h7NjMEMWAAJpfeXzk72v28Sva3AucsHgfd1cml24i8KVW8/j40us/wGM3b eaGWnBbS8EWh05BP+P+DWx0XKdN01yfV6TNcPDdkKXZiwBirDO0HM8CTryg+EuAfJi0O t/Bo+mlbwZtCheLklGKt3Om0AdpOrSL8XDfrGBhhOcOQwX/qrFF9ed9VdTamchxvgNyo pTOg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f19si3789635ejc.31.2020.06.19.06.08.42; Fri, 19 Jun 2020 06:09:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732757AbgFSNDf (ORCPT + 99 others); Fri, 19 Jun 2020 09:03:35 -0400 Received: from foss.arm.com ([217.140.110.172]:57540 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732887AbgFSNCU (ORCPT ); Fri, 19 Jun 2020 09:02:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EA63D101E; Fri, 19 Jun 2020 06:02:19 -0700 (PDT) Received: from entos-d05.shanghai.arm.com (entos-d05.shanghai.arm.com [10.169.40.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BCD523F6CF; Fri, 19 Jun 2020 06:02:13 -0700 (PDT) From: Jianyong Wu To: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, maz@kernel.org, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, steven.price@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, Kaly.Xin@arm.com, justin.he@arm.com, Wei.Chen@arm.com, jianyong.wu@arm.com, nd@arm.com Subject: [PATCH v13 6/9] clocksource: Add clocksource id for arm arch counter Date: Fri, 19 Jun 2020 21:01:17 +0800 Message-Id: <20200619130120.40556-7-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200619130120.40556-1-jianyong.wu@arm.com> References: <20200619130120.40556-1-jianyong.wu@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add clocksource id for arm arch counter to let it be identified easily and elegantly in ptp_kvm implementation for arm. Signed-off-by: Jianyong Wu --- 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 ecf7b7db2d05..edc5be0ae324 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.17.1