Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3021789ybc; Mon, 25 Nov 2019 07:50:11 -0800 (PST) X-Google-Smtp-Source: APXvYqwQT/Z5KoLh5gEiCdRoN1Gv92xOQQlRxjzYrhiJEcQuA//S0OjuIybQdrCuDJPKKomsojWR X-Received: by 2002:a17:907:2122:: with SMTP id qo2mr38276790ejb.12.1574697011134; Mon, 25 Nov 2019 07:50:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574697011; cv=none; d=google.com; s=arc-20160816; b=thG6yC3CwxHytvADH+obnUJUlLGjBgLJnhfNHGaFEXnG3FlDfFzzJoTuC62sZ794Vo G7slKCDkefMXkrrOMmOGXiNsksXPmaz6IdhxbAgmFSAbbD3RQOMs6txQAb1cwzTAAJW0 Td2hLIUeIBJnJugShsWdd0KeeuLBXG4xE1GJpWqhoCC8M8usxKj3AGwTLbcH1cyU5nDc lLJe1KptPcpPRYZOrzX3ne+bTpq3ZPC4Dax81Zc0qGtYnY1jSNYN2aecrqNc4lhO/M7O ucClafb8BULReDe/xBGkDLBxXRjZAdIuWnemH1pJrA+PsFmN4GUsxxgrLqJC9C1cmlde yX7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:cc:from:date:content-transfer-encoding:mime-version :subject:to; bh=1YfEIa32RP4ZL/L00BqWkQmQJkxdHCAY2s9uZKfOY5Y=; b=LiP1vD+voN8sbPMxT6C8POKz7pMW/PArTLA2hMLldgE9SBQytxZCATx09SMng91kHZ 04bgerFZSqG2yFLLbNXxstdlugxTIDxmsuTTYWNEhwM6P1T2E4d0lUuhfDIl3bnz409B mBx7ZHRjzUpjbMSd1HIzs7AGofB6IIbW63QTVw3611kvHu0D2ROsXBOhM2yhNVWcvznS HSWHSEuiBImcUHKGECizCpiPg4Jl5Y1973bkFikps9dhfDk0OVXNKt8HBM30/TW+YWEe sMA25NoelA4jGweoh+1lD3Q1pGoO2M9mBTW7Gr809aBazIg/Dc8M1GswKTvJT5IOhKv7 Gh4A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8si5451170edy.200.2019.11.25.07.49.46; Mon, 25 Nov 2019 07:50:11 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728656AbfKYPrv (ORCPT + 99 others); Mon, 25 Nov 2019 10:47:51 -0500 Received: from inca-roads.misterjones.org ([213.251.177.50]:50298 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbfKYPru (ORCPT ); Mon, 25 Nov 2019 10:47:50 -0500 Received: from www-data by cheepnis.misterjones.org with local (Exim 4.80) (envelope-from ) id 1iZGaS-00029Q-Ac; Mon, 25 Nov 2019 16:47:40 +0100 To: Jianyong Wu Subject: Re: [RFC PATCH v8 3/8] ptp: Reorganize =?UTF-8?Q?ptp=5Fkvm=20modu?= =?UTF-8?Q?les=20to=20make=20it=20arch-independent=2E?= X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 25 Nov 2019 15:47:40 +0000 From: Marc Zyngier Cc: , , , , , , , , , , , , , , , , , In-Reply-To: <20191125104506.36850-4-jianyong.wu@arm.com> References: <20191125104506.36850-1-jianyong.wu@arm.com> <20191125104506.36850-4-jianyong.wu@arm.com> Message-ID: X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/0.7.2 X-SA-Exim-Connect-IP: 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, 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, nd@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-11-25 10:45, Jianyong Wu wrote: > Currently, ptp_kvm modules implementation is only for x86 which > includs > large part of arch-specific code. This patch move all of those code > into 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} | 77 +++++------------- > drivers/ptp/ptp_kvm_x86.c | 87 > +++++++++++++++++++++ > include/asm-generic/ptp_kvm.h | 12 +++ > 4 files changed, 118 insertions(+), 59 deletions(-) > rename drivers/ptp/{ptp_kvm.c => ptp_kvm_common.c} (63%) > create mode 100644 drivers/ptp/ptp_kvm_x86.c > create mode 100644 include/asm-generic/ptp_kvm.h [...] > diff --git a/include/asm-generic/ptp_kvm.h > b/include/asm-generic/ptp_kvm.h > new file mode 100644 > index 000000000000..e5dd386f6664 > --- /dev/null > +++ b/include/asm-generic/ptp_kvm.h > @@ -0,0 +1,12 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Virtual PTP 1588 clock for use with KVM guests > + * > + * Copyright (C) 2019 ARM Ltd. I think you should live the original copyright assignment here. This really isn't anything new. > + * All Rights Reserved > + */ > + > +int kvm_arch_ptp_init(void); > +int kvm_arch_ptp_get_clock(struct timespec64 *ts); > +int kvm_arch_ptp_get_crosststamp(unsigned long *cycle, > + struct timespec64 *tspec, void *cs); Why is this include file in asm-generic? This isn't a kernel-wide API. I think it should be sitting in drivers/ptp, as it is only shared between the generic and arch-specific stuff. Thanks, M. -- Jazz is not dead. It just smells funny...