Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-18 Thread cinifr
HI all, I have modified uboot code to switch monitor mode and to set cntvoff for all smp cpus for allwinner a20 cpu. It works, kernel can run ok without using cntpct. I will commit the path for uboot after reviewing the code. Rong On 13 September 2013 21:40, Marc Zyngier wrote: > On

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-18 Thread cinifr
HI all, I have modified uboot code to switch monitor mode and to set cntvoff for all smp cpus for allwinner a20 cpu. It works, kernel can run ok without using cntpct. I will commit the path for uboot after reviewing the code. Rong On 13 September 2013 21:40, Marc Zyngier

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-16 Thread Marc Zyngier
Hi Maxime, On 14/09/13 13:05, maxime.rip...@free-electrons.com wrote: > Hi Marc, Fan, > > On Fri, Sep 13, 2013 at 10:30:49AM +0100, Marc Zyngier wrote: >> On 13/09/13 09:49, cinifr wrote: >>> On 13 September 2013 00:39, Marc Zyngier >>> wrote: I am wondering what is the principle between

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-16 Thread Marc Zyngier
Hi Maxime, On 14/09/13 13:05, maxime.rip...@free-electrons.com wrote: Hi Marc, Fan, On Fri, Sep 13, 2013 at 10:30:49AM +0100, Marc Zyngier wrote: On 13/09/13 09:49, cinifr wrote: On 13 September 2013 00:39, Marc Zyngier marc.zyng...@arm.com wrote: I am wondering what is the principle

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-14 Thread maxime.rip...@free-electrons.com
Hi Marc, Fan, On Fri, Sep 13, 2013 at 10:30:49AM +0100, Marc Zyngier wrote: > On 13/09/13 09:49, cinifr wrote: > > On 13 September 2013 00:39, Marc Zyngier wrote: > > I am wondering what is the principle between kernel and bootload? > > What should be done in bootloader and what should be

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-14 Thread maxime.rip...@free-electrons.com
Hi Marc, Fan, On Fri, Sep 13, 2013 at 10:30:49AM +0100, Marc Zyngier wrote: On 13/09/13 09:49, cinifr wrote: On 13 September 2013 00:39, Marc Zyngier marc.zyng...@arm.com wrote: I am wondering what is the principle between kernel and bootload? What should be done in bootloader and what

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread cinifr
> > This doesn't change the fact that using the physical timer/counter in a > VM is (or can be) horribly expensive, and should be avoided at all cost. > I will remove suport phy timer counter patch and try to fix it in bootloader. I agree that is elegant only vct is be used.in kernel now. -- To

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread Marc Zyngier
On 13/09/13 14:09, cinifr wrote: >> I urge you to read the ARM ARM, and specifically the section dedicated >> to trapping access to CP15 operations. If you do, you'll quickly notice >> that you *cannot* trap accesses to the timer subsystem. >> > I read it again. The ARMv7 manual said "Is

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread cinifr
> I urge you to read the ARM ARM, and specifically the section dedicated > to trapping access to CP15 operations. If you do, you'll quickly notice > that you *cannot* trap accesses to the timer subsystem. > I read it again. The ARMv7 manual said "Is accessible from Non-secure PL1 modes only when

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread Marc Zyngier
On 13/09/13 09:49, cinifr wrote: > On 13 September 2013 00:39, Marc Zyngier wrote: >> On 12/09/13 17:07, cinifr wrote: This cannot be a compile-time option as above in a multiplatform build. Other paltforms (e.g. KVM guests) *must* use the virtual counters to get any semblance of a

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread cinifr
On 13 September 2013 00:39, Marc Zyngier wrote: > On 12/09/13 17:07, cinifr wrote: >>> This cannot be a compile-time option as above in a multiplatform build. >>> Other paltforms (e.g. KVM guests) *must* use the virtual counters to get >>> any semblance of a consistent view of time. >> Yes I

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread cinifr
On 13 September 2013 00:39, Marc Zyngier marc.zyng...@arm.com wrote: On 12/09/13 17:07, cinifr wrote: This cannot be a compile-time option as above in a multiplatform build. Other paltforms (e.g. KVM guests) *must* use the virtual counters to get any semblance of a consistent view of time.

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread Marc Zyngier
On 13/09/13 09:49, cinifr wrote: On 13 September 2013 00:39, Marc Zyngier marc.zyng...@arm.com wrote: On 12/09/13 17:07, cinifr wrote: This cannot be a compile-time option as above in a multiplatform build. Other paltforms (e.g. KVM guests) *must* use the virtual counters to get any semblance

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread cinifr
I urge you to read the ARM ARM, and specifically the section dedicated to trapping access to CP15 operations. If you do, you'll quickly notice that you *cannot* trap accesses to the timer subsystem. I read it again. The ARMv7 manual said Is accessible from Non-secure PL1 modes only when

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread Marc Zyngier
On 13/09/13 14:09, cinifr wrote: I urge you to read the ARM ARM, and specifically the section dedicated to trapping access to CP15 operations. If you do, you'll quickly notice that you *cannot* trap accesses to the timer subsystem. I read it again. The ARMv7 manual said Is accessible from

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-13 Thread cinifr
This doesn't change the fact that using the physical timer/counter in a VM is (or can be) horribly expensive, and should be avoided at all cost. I will remove suport phy timer counter patch and try to fix it in bootloader. I agree that is elegant only vct is be used.in kernel now. -- To

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Marc Zyngier
On 12/09/13 17:07, cinifr wrote: >> This cannot be a compile-time option as above in a multiplatform build. >> Other paltforms (e.g. KVM guests) *must* use the virtual counters to get >> any semblance of a consistent view of time. > Yes I accept compile-time option is not perfect in my pre email,

Re: [linux-sunxi] Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Ian Campbell
On Thu, 2013-09-12 at 12:24 +0100, Mark Rutland wrote: > > Why can the bootloader not be fixed to set CNTVOFF (or to boot the > kernel in Hyp mode)? It can: http://lists.xen.org/archives/html/xen-devel/2013-09/msg00880.html I was waiting for Andre's hyp mode u-boot patches to land before

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread cinifr
Thanks, but I am tring a solution in running time. On 12 September 2013 22:33, Russell King - ARM Linux wrote: > On Thu, Sep 12, 2013 at 12:24:52PM +0100, Mark Rutland wrote: >> On Thu, Sep 12, 2013 at 07:51:26AM +0100, Fan Rong wrote: >> > diff --git a/drivers/clocksource/Kconfig

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread cinifr
>This cannot be a compile-time option as above in a multiplatform build. >Other paltforms (e.g. KVM guests) *must* use the virtual counters to get >any semblance of a consistent view of time. Yes I accept compile-time option is not perfect in my pre email, But,Why Ohter paltforms *must* use the

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Russell King - ARM Linux
On Thu, Sep 12, 2013 at 12:24:52PM +0100, Mark Rutland wrote: > On Thu, Sep 12, 2013 at 07:51:26AM +0100, Fan Rong wrote: > > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig > > index 41c6946..a4981d2 100644 > > --- a/drivers/clocksource/Kconfig > > +++

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Mark Rutland
On Thu, Sep 12, 2013 at 07:51:26AM +0100, Fan Rong wrote: > Signed-off-by: Fan Rong > --- > arch/arm/include/asm/arch_timer.h| 11 +++ > drivers/clocksource/Kconfig |8 > drivers/clocksource/arm_arch_timer.c | 10 +- > 3 files changed, 28

[PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Fan Rong
Signed-off-by: Fan Rong --- arch/arm/include/asm/arch_timer.h| 11 +++ drivers/clocksource/Kconfig |8 drivers/clocksource/arm_arch_timer.c | 10 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch_timer.h

[PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Fan Rong
Signed-off-by: Fan Rong cin...@gmail.com --- arch/arm/include/asm/arch_timer.h| 11 +++ drivers/clocksource/Kconfig |8 drivers/clocksource/arm_arch_timer.c | 10 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Mark Rutland
On Thu, Sep 12, 2013 at 07:51:26AM +0100, Fan Rong wrote: Signed-off-by: Fan Rong cin...@gmail.com --- arch/arm/include/asm/arch_timer.h| 11 +++ drivers/clocksource/Kconfig |8 drivers/clocksource/arm_arch_timer.c | 10 +- 3 files changed, 28

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Russell King - ARM Linux
On Thu, Sep 12, 2013 at 12:24:52PM +0100, Mark Rutland wrote: On Thu, Sep 12, 2013 at 07:51:26AM +0100, Fan Rong wrote: diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig index 41c6946..a4981d2 100644 --- a/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread cinifr
This cannot be a compile-time option as above in a multiplatform build. Other paltforms (e.g. KVM guests) *must* use the virtual counters to get any semblance of a consistent view of time. Yes I accept compile-time option is not perfect in my pre email, But,Why Ohter paltforms *must* use the

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread cinifr
Thanks, but I am tring a solution in running time. On 12 September 2013 22:33, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Thu, Sep 12, 2013 at 12:24:52PM +0100, Mark Rutland wrote: On Thu, Sep 12, 2013 at 07:51:26AM +0100, Fan Rong wrote: diff --git

Re: [linux-sunxi] Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Ian Campbell
On Thu, 2013-09-12 at 12:24 +0100, Mark Rutland wrote: Why can the bootloader not be fixed to set CNTVOFF (or to boot the kernel in Hyp mode)? It can: http://lists.xen.org/archives/html/xen-devel/2013-09/msg00880.html I was waiting for Andre's hyp mode u-boot patches to land before posting

Re: [PATCH 3/4] Add physical count arch timer support for clocksource in ARMv7.

2013-09-12 Thread Marc Zyngier
On 12/09/13 17:07, cinifr wrote: This cannot be a compile-time option as above in a multiplatform build. Other paltforms (e.g. KVM guests) *must* use the virtual counters to get any semblance of a consistent view of time. Yes I accept compile-time option is not perfect in my pre email,