Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4292421ybz; Mon, 20 Apr 2020 20:25:33 -0700 (PDT) X-Google-Smtp-Source: APiQypKUMNZNYYjlZNcJvddd2K7zM7qsHZ9lfuplNMCEoJTdD8nwJgvbTz+BAskXfIgudQ84bm8f X-Received: by 2002:a05:6402:b2e:: with SMTP id bo14mr4971715edb.90.1587439533752; Mon, 20 Apr 2020 20:25:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587439533; cv=none; d=google.com; s=arc-20160816; b=NR1D2IRKizt0/xSIgbIZALnEXfSe+MzI0NmFFqC/565fDpuWQa/pDM8zQNYVtbneU5 E+wo0sCa9JDEAhepcOwmX9QD7iUTNuxKl63xJ/uhhQ1XgmQyfEsjXANGFhJDMgmupMva KXMyW6/qbYkr83KwCItbI7XY6ehNx2hFlpLt2Aa+M+pKfAo2L6uxEe8gmV57t+sc5zGr 9nc230nOkxdhuDN3WojNwaN9c5W7/zib59u6rkarhuZdA2utG+XFG/rxF7U//Ys2d0+M lCF9GpjN6zRuvums4/Nc6i/tnrUoxDAvgFYBElBRFszYKmzJ03jXzZCuXF4Au0JK2DYX j/iQ== 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=gSbtXwuWdTOVwVTEXnSsz2LQPPFt4aa/jt8BAE4as7o=; b=XYSGXbOGlcMexCYm2IEwtarQthespXr6EFN0yG6sXw91M64nN1bHjnbkYIwly3msmT 6/rn6ZEdQtsGUvhxtUlQvH+lp3DO7bNp3IHFTuRetu9ZwiBxA4o4nfLnghOoSiFv4u9k 8hZOuAe4f/Ipp2E1WJ2DGupt75Pt6kTCcHcKOM74Jss9QPRsVVor0nDptNGF4H5yaaN5 x4hdQ2DItanxHLIc5Q73h5GIBfdqtBGApzpx7RupXUukI95FhwiRML3T0WH5B09HmPJ/ IlgzMF8Yvfx0VcPp1zTEMO1OP3sSYGxlyXq9CFvyhZRBcJ7PeVw3gwuaSzzMZ4U9gtFn gH/w== 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 gy26si809187ejb.384.2020.04.20.20.25.11; Mon, 20 Apr 2020 20:25:33 -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 S1728309AbgDUDXy (ORCPT + 99 others); Mon, 20 Apr 2020 23:23:54 -0400 Received: from foss.arm.com ([217.140.110.172]:57430 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728285AbgDUDXw (ORCPT ); Mon, 20 Apr 2020 23:23:52 -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 E0C9031B; Mon, 20 Apr 2020 20:23:51 -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 D7F043F6CF; Mon, 20 Apr 2020 20:23:44 -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, jianyong.wu@arm.com, nd@arm.com Subject: [RFC PATCH v11 4/9] clocksource: Add clocksource id for arm arch counter Date: Tue, 21 Apr 2020 11:22:59 +0800 Message-Id: <20200421032304.26300-5-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200421032304.26300-1-jianyong.wu@arm.com> References: <20200421032304.26300-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 2204a444e801..0f44f296ed17 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