netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Jianyong Wu <jianyong.wu@arm.com>
Cc: netdev@vger.kernel.org, yangbo.lu@nxp.com,
	john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com,
	sean.j.christopherson@intel.com, richardcochran@gmail.com,
	Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com,
	Andre.Przywara@arm.com, steven.price@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	Steve.Capper@arm.com, justin.he@arm.com, nd@arm.com
Subject: Re: [PATCH v16 3/9] ptp: Reorganize ptp_kvm module to make it arch-independent.
Date: Tue, 02 Feb 2021 13:23:12 +0000	[thread overview]
Message-ID: <bd371ba17f40bd114b87f284f3537ec4@kernel.org> (raw)
In-Reply-To: <20201209060932.212364-4-jianyong.wu@arm.com>

On 2020-12-09 06:09, Jianyong Wu wrote:
> Currently, ptp_kvm modules implementation is only for x86 which 
> includes
> large part of arch-specific code.  This patch moves all of this code
> into a new arch related file in the same directory.
> 
> Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
> ---
>  drivers/ptp/Makefile                        |  1 +
>  drivers/ptp/{ptp_kvm.c => ptp_kvm_common.c} | 84 +++++-------------
>  drivers/ptp/ptp_kvm_x86.c                   | 96 +++++++++++++++++++++
>  include/linux/ptp_kvm.h                     | 16 ++++
>  4 files changed, 135 insertions(+), 62 deletions(-)
>  rename drivers/ptp/{ptp_kvm.c => ptp_kvm_common.c} (60%)
>  create mode 100644 drivers/ptp/ptp_kvm_x86.c
>  create mode 100644 include/linux/ptp_kvm.h
> 

[...]

> diff --git a/include/linux/ptp_kvm.h b/include/linux/ptp_kvm.h
> new file mode 100644
> index 000000000000..6f104b1967bb
> --- /dev/null
> +++ b/include/linux/ptp_kvm.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Virtual PTP 1588 clock for use with KVM guests
> + *
> + * Copyright (C) 2017 Red Hat Inc.
> + */
> +
> +#ifndef _PTP_KVM_H_
> +#define _PTP_KVM_H_
> +
> +int kvm_arch_ptp_init(void);
> +int kvm_arch_ptp_get_clock(struct timespec64 *ts);
> +int kvm_arch_ptp_get_crosststamp(u64 *cycle,
> +		struct timespec64 *tspec, struct clocksource **cs);

You probably want some forward declarations for timespec64 and
clocksource, so that this include file is standalone.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

  parent reply	other threads:[~2021-02-02 13:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  6:09 [PATCH v16 0/9] Enable ptp_kvm for arm/arm64 Jianyong Wu
2020-12-09  6:09 ` [PATCH v16 1/9] arm64: Probe for the presence of KVM hypervisor Jianyong Wu
2021-02-02 13:18   ` Marc Zyngier
2020-12-09  6:09 ` [PATCH v16 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC Jianyong Wu
2020-12-09  6:09 ` [PATCH v16 3/9] ptp: Reorganize ptp_kvm module to make it arch-independent Jianyong Wu
2020-12-09 10:23   ` kernel test robot
2020-12-09 10:23   ` [RFC PATCH] ptp: clock_pair_gpa can be static kernel test robot
2021-02-02 13:23   ` Marc Zyngier [this message]
2020-12-09  6:09 ` [PATCH v16 4/9] time: Add mechanism to recognize clocksource in time_get_snapshot Jianyong Wu
2020-12-09  6:09 ` [PATCH v16 5/9] clocksource: Add clocksource id for arm arch counter Jianyong Wu
2020-12-09  6:09 ` [PATCH v16 6/9] arm64/kvm: Add hypercall service for kvm ptp Jianyong Wu
2021-02-02 13:32   ` Marc Zyngier
2020-12-09  6:09 ` [PATCH v16 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 Jianyong Wu
2021-02-02 13:37   ` Marc Zyngier
2020-12-09  6:09 ` [PATCH v16 8/9] doc: add ptp_kvm introduction for arm64 support Jianyong Wu
2021-02-02 13:43   ` Marc Zyngier
2020-12-09  6:09 ` [PATCH v16 9/9] arm64: Add kvm capability check extension for ptp_kvm Jianyong Wu
2021-02-02 13:44   ` Marc Zyngier
2021-01-06  8:29 ` [PATCH v16 0/9] Enable ptp_kvm for arm/arm64 Jianyong Wu
2021-02-02 14:15 ` Marc Zyngier
2021-02-03  2:40   ` Jianyong Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd371ba17f40bd114b87f284f3537ec4@kernel.org \
    --to=maz@kernel.org \
    --cc=Andre.Przywara@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=Steve.Capper@arm.com \
    --cc=jianyong.wu@arm.com \
    --cc=john.stultz@linaro.org \
    --cc=justin.he@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nd@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=steven.price@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=yangbo.lu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).