[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <HE1PR0801MB16762F7310EC28FE8DDEAC2EF4920@HE1PR0801MB1676.eurprd08.prod.outlook.com>
Date: Wed, 16 Oct 2019 10:20:19 +0000
From: "Jianyong Wu (Arm Technology China)" <Jianyong.Wu@....com>
To: Paolo Bonzini <pbonzini@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"yangbo.lu@....com" <yangbo.lu@....com>,
"john.stultz@...aro.org" <john.stultz@...aro.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
"maz@...nel.org" <maz@...nel.org>,
"richardcochran@...il.com" <richardcochran@...il.com>,
Mark Rutland <Mark.Rutland@....com>,
"will@...nel.org" <will@...nel.org>,
Suzuki Poulose <Suzuki.Poulose@....com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Steve Capper <Steve.Capper@....com>,
"Kaly Xin (Arm Technology China)" <Kaly.Xin@....com>,
"Justin He (Arm Technology China)" <Justin.He@....com>,
nd <nd@....com>
Subject: RE: [PATCH v5 4/6] psci: Add hvc call service for ptp_kvm.
Hi Paolo,
> -----Original Message-----
> From: Paolo Bonzini <pbonzini@...hat.com>
> Sent: Wednesday, October 16, 2019 3:25 PM
> To: Jianyong Wu (Arm Technology China) <Jianyong.Wu@....com>;
> netdev@...r.kernel.org; yangbo.lu@....com; john.stultz@...aro.org;
> tglx@...utronix.de; sean.j.christopherson@...el.com; maz@...nel.org;
> richardcochran@...il.com; Mark Rutland <Mark.Rutland@....com>;
> will@...nel.org; Suzuki Poulose <Suzuki.Poulose@....com>
> Cc: linux-kernel@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> kvmarm@...ts.cs.columbia.edu; kvm@...r.kernel.org; Steve Capper
> <Steve.Capper@....com>; Kaly Xin (Arm Technology China)
> <Kaly.Xin@....com>; Justin He (Arm Technology China)
> <Justin.He@....com>; nd <nd@....com>
> Subject: Re: [PATCH v5 4/6] psci: Add hvc call service for ptp_kvm.
>
> 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?
Need fix.
Thanks
Jianyong
>
> 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
Powered by blists - more mailing lists