public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* arm64 hitting BUG in arch_timer.h
@ 2014-12-10 20:56 Mark Salter
  2014-12-10 22:43 ` Sonny Rao
  2014-12-11 19:00 ` Sergei Shtylyov
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Salter @ 2014-12-10 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

Using Linus' tree from this morning, I am hitting:

   [    0.000000] BUG: failure at ./arch/arm64/include/asm/arch_timer.h:112/arch_counter_get_cntpct!

This is triggered by commit 0b46b8a718 ("clocksource: arch_timer: Fix
code to use physical timers when requested") which addresses an armv7
problem. Arm64 wants to always use a virtual timer. I used this to avoid
the BUG and get a booting kernel:

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch
index 71846f9..4d8a01e 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -468,7 +468,7 @@ static void __init arch_counter_register(unsigned type)
 
        /* Register the CP15 based counter if we have one */
        if (type & ARCH_CP15_TIMER) {
-               if (arch_timer_use_virtual)
+               if (IS_ENABLED(CONFIG_ARM64) || arch_timer_use_virtual)
                        arch_timer_read_counter = arch_counter_get_cntvct;
                else
                        arch_timer_read_counter = arch_counter_get_cntpct;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* arm64 hitting BUG in arch_timer.h
  2014-12-10 20:56 arm64 hitting BUG in arch_timer.h Mark Salter
@ 2014-12-10 22:43 ` Sonny Rao
  2014-12-11 17:52   ` Catalin Marinas
  2014-12-11 19:00 ` Sergei Shtylyov
  1 sibling, 1 reply; 5+ messages in thread
From: Sonny Rao @ 2014-12-10 22:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 10, 2014 at 12:56 PM, Mark Salter <msalter@redhat.com> wrote:
> Using Linus' tree from this morning, I am hitting:
>
>    [    0.000000] BUG: failure at ./arch/arm64/include/asm/arch_timer.h:112/arch_counter_get_cntpct!
>
> This is triggered by commit 0b46b8a718 ("clocksource: arch_timer: Fix
> code to use physical timers when requested") which addresses an armv7
> problem. Arm64 wants to always use a virtual timer. I used this to avoid
> the BUG and get a booting kernel:
>
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch
> index 71846f9..4d8a01e 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -468,7 +468,7 @@ static void __init arch_counter_register(unsigned type)
>
>         /* Register the CP15 based counter if we have one */
>         if (type & ARCH_CP15_TIMER) {
> -               if (arch_timer_use_virtual)
> +               if (IS_ENABLED(CONFIG_ARM64) || arch_timer_use_virtual)
>                         arch_timer_read_counter = arch_counter_get_cntvct;
>                 else
>                         arch_timer_read_counter = arch_counter_get_cntpct;
>
>

Yes Catalin has prepared a similar patch:
https://patchwork.kernel.org/patch/5468031/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arm64 hitting BUG in arch_timer.h
  2014-12-10 22:43 ` Sonny Rao
@ 2014-12-11 17:52   ` Catalin Marinas
  0 siblings, 0 replies; 5+ messages in thread
From: Catalin Marinas @ 2014-12-11 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 10, 2014 at 10:43:54PM +0000, Sonny Rao wrote:
> On Wed, Dec 10, 2014 at 12:56 PM, Mark Salter <msalter@redhat.com> wrote:
> > Using Linus' tree from this morning, I am hitting:
> >
> >    [    0.000000] BUG: failure at ./arch/arm64/include/asm/arch_timer.h:112/arch_counter_get_cntpct!
> >
> > This is triggered by commit 0b46b8a718 ("clocksource: arch_timer: Fix
> > code to use physical timers when requested") which addresses an armv7
> > problem. Arm64 wants to always use a virtual timer. I used this to avoid
> > the BUG and get a booting kernel:
> >
> > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch
> > index 71846f9..4d8a01e 100644
> > --- a/drivers/clocksource/arm_arch_timer.c
> > +++ b/drivers/clocksource/arm_arch_timer.c
> > @@ -468,7 +468,7 @@ static void __init arch_counter_register(unsigned type)
> >
> >         /* Register the CP15 based counter if we have one */
> >         if (type & ARCH_CP15_TIMER) {
> > -               if (arch_timer_use_virtual)
> > +               if (IS_ENABLED(CONFIG_ARM64) || arch_timer_use_virtual)
> >                         arch_timer_read_counter = arch_counter_get_cntvct;
> >                 else
> >                         arch_timer_read_counter = arch_counter_get_cntpct;
> >
> >
> 
> Yes Catalin has prepared a similar patch:
> https://patchwork.kernel.org/patch/5468031/

Indeed. Daniel will be pushing it upstream.

-- 
Catalin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arm64 hitting BUG in arch_timer.h
  2014-12-10 20:56 arm64 hitting BUG in arch_timer.h Mark Salter
  2014-12-10 22:43 ` Sonny Rao
@ 2014-12-11 19:00 ` Sergei Shtylyov
  2014-12-11 19:11   ` Mark Salter
  1 sibling, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2014-12-11 19:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 12/10/2014 11:56 PM, Mark Salter wrote:

> Using Linus' tree from this morning, I am hitting:

>     [    0.000000] BUG: failure at ./arch/arm64/include/asm/arch_timer.h:112/arch_counter_get_cntpct!

> This is triggered by commit 0b46b8a718 ("clocksource: arch_timer: Fix
> code to use physical timers when requested") which addresses an armv7
> problem. Arm64 wants to always use a virtual timer. I used this to avoid
> the BUG and get a booting kernel:

    You didn't sign off on the patch, so it can't be applied.

[...]

WBR, Sergei

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arm64 hitting BUG in arch_timer.h
  2014-12-11 19:00 ` Sergei Shtylyov
@ 2014-12-11 19:11   ` Mark Salter
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Salter @ 2014-12-11 19:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2014-12-11 at 22:00 +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 12/10/2014 11:56 PM, Mark Salter wrote:
> 
> > Using Linus' tree from this morning, I am hitting:
> 
> >     [    0.000000] BUG: failure at ./arch/arm64/include/asm/arch_timer.h:112/arch_counter_get_cntpct!
> 
> > This is triggered by commit 0b46b8a718 ("clocksource: arch_timer: Fix
> > code to use physical timers when requested") which addresses an armv7
> > problem. Arm64 wants to always use a virtual timer. I used this to avoid
> > the BUG and get a booting kernel:
> 
>     You didn't sign off on the patch, so it can't be applied.
> 
> [...]
> 
> WBR, Sergei
> 

Right. That was more for discussion. I wasn't sure if that was the best
way to fix the problem so I just included what I did to work around it.
As it turns out, I wasn't the first to spot the problem or come up with
a patch. So, the first patch will go in without my further involvement.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-11 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 20:56 arm64 hitting BUG in arch_timer.h Mark Salter
2014-12-10 22:43 ` Sonny Rao
2014-12-11 17:52   ` Catalin Marinas
2014-12-11 19:00 ` Sergei Shtylyov
2014-12-11 19:11   ` Mark Salter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox