Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp633411ybx; Thu, 7 Nov 2019 00:03:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxfpkGuxCsLPxnGOw8EgihblZ3gnMGqJ+01amV7JiEqvYphZd5QhXeGELVb4xNNxrWcsY1/ X-Received: by 2002:a17:906:5586:: with SMTP id y6mr1777272ejp.76.1573113796220; Thu, 07 Nov 2019 00:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573113796; cv=none; d=google.com; s=arc-20160816; b=AY7WyqVRKMVxLNfMj5CKz0EwYSN8c4lFNKzRvfGBl5T2XWTQNZQqGhhYFKqjby5Aax MkOF+kZ2HfyHbjbjn240h07NJSNZVEjDe20LfQABhZSQdLlDpXt5X7jqfqnYVwDPVlNb LnHNsCWTjrx4So+glwYltnRqs/G7UJu8EkLvszyXb7/KpTClz8YofUi1tdUd0SktK8dW MeQlNRHJqNkPZNwS8s8qYZNVk8jw/CcgQj/J1hGTCyeiecQS1fYq4hAy+nfwuJyaNYTE vOemVsx/970fQbfumROODC1TL3pPBsHdeKx02kYIdIb3hx336CUZ7ak3zVT0wW3Ohqzm 6+nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=4wqQedZ/mk4+FzeSMz+BDrs36ur8IqaK/J6+HufiBZU=; b=diZm1yEqC4swv2tpRAqsjtWMBQW8gwHsy4p39PF0FmcDnnFW3OoKaNvjQhFqOTDEIY flOHgL2MbRUEkAbTGKDBIbQCm6Gk2IysujslretJYiN5POcee+G+oeTDz03/9qHIaNN+ HfTKHJ/jVUHN55Xc6nu7vpqK3GNSj+IITauWsEHi4qvK7BmiyPDfJqOO35MzJfhmLaX6 1AEc+wV+VVmMGSXdZtfbXsCQ2D1VNOELDIzKCozKRS84RwEnLGctKgBHzgDGKDntSqBj WjyfrGrQw22BO+6EpiwaRIorb5z/MKIevuz4XowPmTxrCtBxIDfNklrUHqK7YkoUKvEK K6oQ== 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 92si981375edh.321.2019.11.07.00.02.49; Thu, 07 Nov 2019 00:03:16 -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 S1727466AbfKGIBn (ORCPT + 99 others); Thu, 7 Nov 2019 03:01:43 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:46430 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfKGIBn (ORCPT ); Thu, 7 Nov 2019 03:01:43 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iScjQ-0000io-4h; Thu, 07 Nov 2019 09:01:28 +0100 Date: Thu, 7 Nov 2019 09:01:26 +0100 (CET) From: Thomas Gleixner To: Jianyong Wu cc: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, 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, 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 Subject: Re: [RFC PATCH v6 5/7] psci: Add hvc call service for ptp_kvm. In-Reply-To: <20191024110209.21328-6-jianyong.wu@arm.com> Message-ID: References: <20191024110209.21328-1-jianyong.wu@arm.com> <20191024110209.21328-6-jianyong.wu@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Oct 2019, Jianyong Wu wrote: > This patch is the base of ptp_kvm for arm64. This patch ... > ptp_kvm modules will call hvc to get this service. > The service offers real time and counter cycle of host for guest. > > Signed-off-by: Jianyong Wu > --- > drivers/clocksource/arm_arch_timer.c | 2 ++ > include/clocksource/arm_arch_timer.h | 4 ++++ > include/linux/arm-smccc.h | 12 ++++++++++++ > virt/kvm/arm/psci.c | 22 ++++++++++++++++++++++ > 4 files changed, 40 insertions(+) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index 07e57a49d1e8..e4ad38042ef6 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -29,6 +29,7 @@ > #include > > #include > +#include Same ordering issue and lack of file. > diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h > index 1d68d5613dae..426d749e8cf8 100644 > --- a/include/clocksource/arm_arch_timer.h > +++ b/include/clocksource/arm_arch_timer.h > @@ -104,6 +104,10 @@ static inline bool arch_timer_evtstrm_available(void) > return false; > } > > +bool is_arm_arch_counter(void *unuse) A global function in a header file? You might want to make this static inline. And while at it please s/unuse/unused/ > +{ > + return false; > +} > #endif > #include > diff --git a/virt/kvm/arm/psci.c b/virt/kvm/arm/psci.c > index 0debf49bf259..339bcbafac7b 100644 > --- a/virt/kvm/arm/psci.c > +++ b/virt/kvm/arm/psci.c > @@ -15,6 +15,7 @@ > #include > > #include > +#include Sigh. > /* > * This is an implementation of the Power State Coordination Interface > @@ -392,6 +393,8 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu) > u32 func_id = smccc_get_function(vcpu); > u32 val[4] = {}; > u32 option; > + u64 cycles; > + struct system_time_snapshot systime_snapshot; Also here you might notice that the variables are not randomly ordered. Thanks, tglx