Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2706105ybc; Mon, 25 Nov 2019 02:50:21 -0800 (PST) X-Google-Smtp-Source: APXvYqxcTIKadzbAvbXrblCkUF5v3Bx8GzgHWzK6d3xo8bHEUa3UBEwhdYA1dKXJXwZODICNuH8N X-Received: by 2002:a50:ac7c:: with SMTP id w57mr17790387edc.155.1574679021136; Mon, 25 Nov 2019 02:50:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574679021; cv=none; d=google.com; s=arc-20160816; b=dyjnfciDAKkhrgNg4sDtJkJYLcMoJfx0v6wZNBGH5ZFBOxghtTvSRMCGfRhzLTILnb sWJmlgrKgIZL+T9wlmI0O+wZKrS2QVw7erjFId48+D5QAkPfrjXMzPoWKb2ccWmnQN30 qIvX0xyVDyd6P90C9nqXQJkYO7e4Snk6DVGUQzZBlZcWpBub4ob23xVzSOs8YPhEpqry yKeuwMGO3XkJk7RTKRn3Bctiahf58yjobY1QipB2+s3RulK8BRgH5LvmUv26jru0ZGfg hG1D0YRNZS8sbsP57nZRwWINjyYDNFx8id8FKr8GXoqoHr8TQ0ylwHSE8v2nexf1Ht2+ QOqw== 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=nEQOL4pzYxlfLJprvmlOjCL5OK2iI3ctDno0iyyGgQc=; b=gVe/s9CacPcSsU0aLtJOb4tmFOUEDlS1YEKq0LEEtgwcn6DlZOMf4u3NAHHtNtMaT+ Q9j1br5h303X8ZlXiWgsUIHoB+GNzs+Cd2Gob8XiaAJsTM38oA5f8+FLJOx7OsrGZ+Mk BIxno+v12hI+fprlE6zcBLE29+F4uD4EXtZx21L0s731DaNXLXIJyvjz+ZJMPkDWi/yP nRnUxqf5YEwKB1gIyG824WzR2tjeAnjMbJBv/oRhH7okePs1e6a9h/tNjQcjFwtK1Gd1 Yje6BK6HwHI+ilwik6aNGQPalh3AqBosuTJVDhMVxZV8ac65bveB4SSAtUoeRMU4gBGZ 67bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si5160240eda.291.2019.11.25.02.49.56; Mon, 25 Nov 2019 02:50:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727527AbfKYKqD (ORCPT + 99 others); Mon, 25 Nov 2019 05:46:03 -0500 Received: from foss.arm.com ([217.140.110.172]:48138 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727696AbfKYKqA (ORCPT ); Mon, 25 Nov 2019 05:46:00 -0500 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 5EA371045; Mon, 25 Nov 2019 02:46:00 -0800 (PST) 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 3CA053F52E; Mon, 25 Nov 2019 02:45:55 -0800 (PST) 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 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 v8 5/8] clocksource: Add clocksource id for arm arch counter Date: Mon, 25 Nov 2019 18:45:03 +0800 Message-Id: <20191125104506.36850-6-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191125104506.36850-1-jianyong.wu@arm.com> References: <20191125104506.36850-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 07e57a49d1e8..277846decd33 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 @@ -187,6 +188,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 5595ab843c3d..93bec8426c44 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