Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp395154ybt; Fri, 19 Jun 2020 04:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6g0bpqqaIjsr4ctAw4Rlm10UJVpHdj6getxd02UyN1QwghUNgK6BIVYGfG/rCmwtUuuw6 X-Received: by 2002:a17:906:f2d9:: with SMTP id gz25mr3417938ejb.467.1592566537435; Fri, 19 Jun 2020 04:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592566537; cv=none; d=google.com; s=arc-20160816; b=lfitdh0yWPhWKcIZ7ioMBxfmipkhZak5WviGKExkIIKBjudRbTmQjEl29JbVEB6tMV oBLQaPJJJMc1AoMlTphve3KR6Bvd63GiV813CNIzyC78ENoUD0bfyOB4tgI+KHK5BRnj eCKudkShryQ24VdCBu/iWB10sfAcSxluiNFLEpq82athtWBdU2ZXkUzR1ZmWpJp58ZGg TYiNCjz5ZoBQJ5EwTDdlA5PsGsV/wexJygySdmK0N/4Ehu20CQHm1LPcBCxyak6l/+A+ BH7rpz691VeOLi8FImo3p75Tvrw5QQVJohtLIPcI14bMfkQyNYfre4azxxBXoRaqVVPf VjIQ== 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=GDQjqLKOA/LWMANJpU+jJX3lTAMfakUhhnHg9ViC3gNP9FzY+zqHnDX3MTK4szHedq rY4h5JaT1lDAoB2Bdanaf7fG4JXnXypSXTNNkNGN3irl/mwFIdjez7zljXOakrCC08yX pMk7M1Zd9IByYnch9XM5rAmbixnnuynXubhjeDZzTq7D1gzCzFMTjOCcuEDlgJhf9Iqu k0r1fE2nbqdZgECnET/WEAVDv7Bh8/JGDQvtj++Zj6PL/L7DfM10Htkw4WBotrbEJE+8 kEZ9P2u3+waNGERXbVadzcpgXZsWwj+Nrz2kDHum2Of/HPgwo90sSfyN1d3KiD57mtR7 dRZw== 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 a63si3879362edf.135.2020.06.19.04.35.14; Fri, 19 Jun 2020 04:35:37 -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 S1732040AbgFSJeK (ORCPT + 99 others); Fri, 19 Jun 2020 05:34:10 -0400 Received: from foss.arm.com ([217.140.110.172]:49278 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731780AbgFSJba (ORCPT ); Fri, 19 Jun 2020 05:31:30 -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 EAF8013FD; Fri, 19 Jun 2020 02:31:28 -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 BE7D73F71F; Fri, 19 Jun 2020 02:31:22 -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: [RFC PATCH v13 6/9] clocksource: Add clocksource id for arm arch counter Date: Fri, 19 Jun 2020 17:30:30 +0800 Message-Id: <20200619093033.58344-7-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200619093033.58344-1-jianyong.wu@arm.com> References: <20200619093033.58344-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