Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3498825ybv; Mon, 10 Feb 2020 00:51:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwCDt1yxSqYkvSdy8g1lQU/7LwW3DmVkf7LO+VHJaF5bMbZ6gD9OsMWF7luwwUsoqyUq6Fu X-Received: by 2002:a9d:268:: with SMTP id 95mr288093otb.183.1581324680981; Mon, 10 Feb 2020 00:51:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581324680; cv=none; d=google.com; s=arc-20160816; b=OULWxjp0kb+Dd+2sJBmv2TofvfZFNXCmu+OIF51Vruk8mYImKOZr1jiiBmRQ88I5qg FVVxS9tpkG01g7baHrZyu9JBHID9ypJRlI8Myw9SI4Kmk7KeNQvTw9RK0AmXk2erQMKf DQjzvrOgNzC+Ee0AK72SX9LYtOb6FeP9AKnDnSXUZvhyahMOy26/Q4ZkUawQ0HjI2CDb Ez6aNmwVr4baBq+ranZQJLgtFnH7Cvm9Ssc7IfSSPcpfSsv8vm7KpLiLcEA9AfFWXLPH 6rP/lLDykV1ci/nhBjuTSEZP9bAhdgitFyIn5nCnmzkuD8YFw2onmI5QFAWvlWQRNeEy fCrg== 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=FlzbzgzcT8crMilf7mVWzTM9Q81vK+XXFogGaz1eAN4=; b=0y8oS/GeR7aUWOtQrJsG4QUyuPDinceV/hPT5wl/uvEVP2bOAPRbdyT/+t9bLmwAAS M0DZ0FKIpIm7K5ZuJ0Xdl8NJlSwIk9G7erRwGpVJJ2YSTvfpcp4JCQ21x0IIApgvdEZ7 6zojPA8XmMbGUWOjgOQZN9iCk5wFjUv6ZeTXrTAf3atXJm6Ilujl8xjVyQT7o4V5X6wR w5T34RvosM8Pbw34Ul2x8glb2LUEo03tSI44+kurcDScIWusEV+QNbpqmQRce2lWVpsV Fjx2n6HDb3OR2jD+KxAdcImANdrBZD9O9ICCZ7YkMGI2IL7bAbPKfTGvInF3mrJWo9l6 wjLQ== 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 g2si4840097otn.117.2020.02.10.00.51.09; Mon, 10 Feb 2020 00:51:20 -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 S1727695AbgBJItu (ORCPT + 99 others); Mon, 10 Feb 2020 03:49:50 -0500 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 S1727681AbgBJItt (ORCPT ); Mon, 10 Feb 2020 03:49:49 -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 0BDD231B; Mon, 10 Feb 2020 00:49:49 -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 B2E6A3F68F; Mon, 10 Feb 2020 00:49:43 -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, 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 4/9] clocksource: Add clocksource id for arm arch counter Date: Mon, 10 Feb 2020 16:49:01 +0800 Message-Id: <20200210084906.24870-5-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200210084906.24870-1-jianyong.wu@arm.com> References: <20200210084906.24870-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 9a5464c625b4..4eb014fefa5b 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