From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8439C433E0 for ; Tue, 2 Feb 2021 13:24:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A170764F5D for ; Tue, 2 Feb 2021 13:24:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A170764F5D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T3deUDR0m3AdKP6etzLZBlYv+Voa77dsnCVL1nY0eGc=; b=d5SPD/EGcTj9lXYwSDlAhJGOk IZ2ohY0sa1cx1sLRvvCM54vRuNnDyZ0bqJTpUTokSVevUGp/wWYxKclD22zbWSw4K+v00XVkij21F ZsMuXq8DqPdhSUlInFM2rOR+Lbq3uMRnbK/S6GakxYtsivgIG0sOinrtoAAc3pWT8OJ8e1XMrmXhf QiF4iYdDzfBBtTuo26nZqRmmJIIYy2W0Zx4VQ+EcM9LtaZU7DKYgaF74vwT7FaIwyI/br2BUceUye pnb8I52NbirMUZM02wYd4bvSsAESamcvclDIYiKN1EU+Ax4eKZeQ8rCTRp+S17X8ADjEGNbvNMrJm 5NGnKshhQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6veI-0007ro-KR; Tue, 02 Feb 2021 13:23:18 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6veG-0007rN-8r for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2021 13:23:17 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B675B64F5D; Tue, 2 Feb 2021 13:23:14 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l6veC-00BV0O-Nn; Tue, 02 Feb 2021 13:23:12 +0000 MIME-Version: 1.0 Date: Tue, 02 Feb 2021 13:23:12 +0000 From: Marc Zyngier To: Jianyong Wu Subject: Re: [PATCH v16 3/9] ptp: Reorganize ptp_kvm module to make it arch-independent. In-Reply-To: <20201209060932.212364-4-jianyong.wu@arm.com> References: <20201209060932.212364-1-jianyong.wu@arm.com> <20201209060932.212364-4-jianyong.wu@arm.com> User-Agent: Roundcube Webmail/1.4.10 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: jianyong.wu@arm.com, 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 X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210202_082316_454360_DF35C86F X-CRM114-Status: GOOD ( 18.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark.Rutland@arm.com, justin.he@arm.com, kvm@vger.kernel.org, suzuki.poulose@arm.com, netdev@vger.kernel.org, richardcochran@gmail.com, Steve.Capper@arm.com, linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, steven.price@arm.com, Andre.Przywara@arm.com, john.stultz@linaro.org, yangbo.lu@nxp.com, pbonzini@redhat.com, tglx@linutronix.de, nd@arm.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > --- > 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... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel