kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jianyong Wu <jianyong.wu@arm.com>,
	netdev@vger.kernel.org, yangbo.lu@nxp.com,
	john.stultz@linaro.org, tglx@linutronix.de,
	sean.j.christopherson@intel.com, maz@kernel.org,
	richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org,
	suzuki.poulose@arm.com
Cc: justin.he@arm.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, nd@arm.com,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 4/6] psci: Add hvc call service for ptp_kvm.
Date: Wed, 16 Oct 2019 09:24:54 +0200	[thread overview]
Message-ID: <9641fbff-cfcd-4854-e0c9-0b97d44193ee@redhat.com> (raw)
In-Reply-To: <20191015104822.13890-5-jianyong.wu@arm.com>

On 15/10/19 12:48, Jianyong Wu wrote:
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index 07e57a49d1e8..3597f1f27b10 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -1634,3 +1634,8 @@ static int __init arch_timer_acpi_init(struct acpi_table_header *table)
>  }
>  TIMER_ACPI_DECLARE(arch_timer, ACPI_SIG_GTDT, arch_timer_acpi_init);
>  #endif
> +
> +bool is_arm_arch_counter(void *cs)
> +{
> +	return (struct clocksource *)cs == &clocksource_counter;
> +}

As Thomas pointed out, any reason to have a void * here?

However, since he didn't like modifying the struct, here is an
alternative idea:

1) add a "struct clocksource*" argument to ktime_get_snapshot

2) return -ENODEV if the argument is not NULL and is not the current
clocksource

3) move the implementation of the hypercall to
drivers/clocksource/arm_arch_timer.c, so that it can call
ktime_get_snapshot(&systime_snapshot, &clocksource_counter);

Paolo

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2019-10-16  7:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 10:48 [RFC PATCH v5 0/6] Enable ptp_kvm for arm64 Jianyong Wu
2019-10-15 10:48 ` [PATCH v5 1/6] psci: Export psci_ops.conduit symbol as modules will use it Jianyong Wu
2019-10-15 17:24   ` Mark Rutland
2019-10-16  3:54     ` Jianyong Wu (Arm Technology China)
2019-10-15 10:48 ` [PATCH v5 2/6] ptp: Reorganize ptp_kvm modules to make it arch-independent Jianyong Wu
2019-10-16  7:10   ` Paolo Bonzini
2019-10-16 10:04     ` Jianyong Wu (Arm Technology China)
2019-10-15 10:48 ` [PATCH v5 3/6] timekeeping: Add clocksource to system_time_snapshot Jianyong Wu
2019-10-15 16:37   ` Paolo Bonzini
2019-10-15 20:13     ` Thomas Gleixner
2019-10-15 22:36       ` Paolo Bonzini
2019-10-16  7:28         ` Thomas Gleixner
2019-10-16  9:48           ` Jianyong Wu (Arm Technology China)
2019-10-16 10:23             ` Thomas Gleixner
2019-10-15 20:12   ` Thomas Gleixner
2019-10-15 22:35     ` Paolo Bonzini
2019-10-16 10:01     ` Jianyong Wu (Arm Technology China)
2019-10-16 10:26       ` Thomas Gleixner
2019-10-15 10:48 ` [PATCH v5 4/6] psci: Add hvc call service for ptp_kvm Jianyong Wu
2019-10-16  7:24   ` Paolo Bonzini [this message]
2019-10-16  7:31     ` Thomas Gleixner
2019-10-16  7:42       ` Paolo Bonzini
2019-10-16 10:20     ` Jianyong Wu (Arm Technology China)
2019-10-15 10:48 ` [PATCH v5 5/6] ptp: arm64: Enable ptp_kvm for arm64 Jianyong Wu
2019-10-15 16:39   ` Paolo Bonzini
2019-10-16  3:52     ` Jianyong Wu (Arm Technology China)
2019-10-16  7:10       ` Paolo Bonzini
2019-10-16  7:13         ` Paolo Bonzini
2019-10-16 10:11           ` Jianyong Wu (Arm Technology China)
2019-10-15 10:48 ` [PATCH v5 6/6] kvm: arm64: Add capability check extension for ptp_kvm 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=9641fbff-cfcd-4854-e0c9-0b97d44193ee@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Mark.Rutland@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=maz@kernel.org \
    --cc=nd@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=sean.j.christopherson@intel.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).