linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
       [not found]       ` <4C4D4C2E.8010103@monstr.eu>
@ 2010-07-27 23:18         ` Andrew Morton
  2010-07-27 23:54           ` Mike Frysinger
  2010-07-28  5:20           ` Michal Simek
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Morton @ 2010-07-27 23:18 UTC (permalink / raw)
  To: monstr; +Cc: rostedt, linux-kernel, tglx, mingo, linux-arch

On Mon, 26 Jul 2010 10:49:50 +0200
Michal Simek <monstr@monstr.eu> wrote:

> start/stop_critical_timing function for preemptirqsoff, preemptoff
> and irqsoff tracers contains atomic_inc and atomic_dec operations.
> 
> Atomic operations used local_irq_save/restore macros to ensure
> atomic access but they are traced by the same function which is causing
> recursion problem.
> 
> The reason is when these tracers are turn ON then local_irq_save/restore
> macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off
> which call start/stop_critical_timing.
> 
> Microblaze was affected because use generic atomic implementation.

Seems that this will also affect blackfin, mn10300 and score.  I guess
they aren't supporting tracing yet?

> Signed-off-by: Michal Simek <monstr@monstr.eu>
> Acked-by: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

hm, I wonder how my signoff got there.  Doesn't matter.

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

* Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
  2010-07-27 23:18         ` [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore Andrew Morton
@ 2010-07-27 23:54           ` Mike Frysinger
  2010-07-27 23:54             ` Mike Frysinger
  2010-07-28  5:23             ` Michal Simek
  2010-07-28  5:20           ` Michal Simek
  1 sibling, 2 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-07-27 23:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: monstr, rostedt, linux-kernel, tglx, mingo, linux-arch

On Tue, Jul 27, 2010 at 19:18, Andrew Morton wrote:
> On Mon, 26 Jul 2010 10:49:50 +0200 Michal Simek wrote:
>> start/stop_critical_timing function for preemptirqsoff, preemptoff
>> and irqsoff tracers contains atomic_inc and atomic_dec operations.
>>
>> Atomic operations used local_irq_save/restore macros to ensure
>> atomic access but they are traced by the same function which is causing
>> recursion problem.
>>
>> The reason is when these tracers are turn ON then local_irq_save/restore
>> macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off
>> which call start/stop_critical_timing.
>>
>> Microblaze was affected because use generic atomic implementation.
>
> Seems that this will also affect blackfin, mn10300 and score.  I guess
> they aren't supporting tracing yet?

do you mean TRACE_IRQFLAGS_SUPPORT ?  Blackfin should ... my
understanding was that arches just needed to implement asm/irqflags.h
for it.
-mike

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

* Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
  2010-07-27 23:54           ` Mike Frysinger
@ 2010-07-27 23:54             ` Mike Frysinger
  2010-07-28  5:23             ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-07-27 23:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: monstr, rostedt, linux-kernel, tglx, mingo, linux-arch

On Tue, Jul 27, 2010 at 19:18, Andrew Morton wrote:
> On Mon, 26 Jul 2010 10:49:50 +0200 Michal Simek wrote:
>> start/stop_critical_timing function for preemptirqsoff, preemptoff
>> and irqsoff tracers contains atomic_inc and atomic_dec operations.
>>
>> Atomic operations used local_irq_save/restore macros to ensure
>> atomic access but they are traced by the same function which is causing
>> recursion problem.
>>
>> The reason is when these tracers are turn ON then local_irq_save/restore
>> macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off
>> which call start/stop_critical_timing.
>>
>> Microblaze was affected because use generic atomic implementation.
>
> Seems that this will also affect blackfin, mn10300 and score.  I guess
> they aren't supporting tracing yet?

do you mean TRACE_IRQFLAGS_SUPPORT ?  Blackfin should ... my
understanding was that arches just needed to implement asm/irqflags.h
for it.
-mike

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

* Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
  2010-07-27 23:18         ` [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore Andrew Morton
  2010-07-27 23:54           ` Mike Frysinger
@ 2010-07-28  5:20           ` Michal Simek
  2010-07-28  5:35             ` Mike Frysinger
  1 sibling, 1 reply; 6+ messages in thread
From: Michal Simek @ 2010-07-28  5:20 UTC (permalink / raw)
  To: Andrew Morton; +Cc: rostedt, linux-kernel, tglx, mingo, linux-arch

Andrew Morton wrote:
> On Mon, 26 Jul 2010 10:49:50 +0200
> Michal Simek <monstr@monstr.eu> wrote:
> 
>> start/stop_critical_timing function for preemptirqsoff, preemptoff
>> and irqsoff tracers contains atomic_inc and atomic_dec operations.
>>
>> Atomic operations used local_irq_save/restore macros to ensure
>> atomic access but they are traced by the same function which is causing
>> recursion problem.
>>
>> The reason is when these tracers are turn ON then local_irq_save/restore
>> macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off
>> which call start/stop_critical_timing.
>>
>> Microblaze was affected because use generic atomic implementation.
> 
> Seems that this will also affect blackfin, mn10300 and score.  I guess
> they aren't supporting tracing yet?

If they uses asm-generic/atomic.h, then yes. It seems to me that 
Blackfin uses own asm/atomic.h. nm10300 and score are the same case as 
Microblaze.

In include/linux/irqflags.h is written this commentary.

/*
  * The local_irq_*() APIs are equal to the raw_local_irq*()
  * if !TRACE_IRQFLAGS.
  */

If architecture doesn't enable TRACE_IRQFLAGS then there is no 
difference in behavior. If yes and use asm-generic/atomic.h code, then 
IRQFLAG tracer freeze because it is traced part of irqsoff tracer 
because of recursion as is describe in patch description.

> 
>> Signed-off-by: Michal Simek <monstr@monstr.eu>
>> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 
> hm, I wonder how my signoff got there.  Doesn't matter.

http://lkml.org/lkml/2010/5/26/364

Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
  2010-07-27 23:54           ` Mike Frysinger
  2010-07-27 23:54             ` Mike Frysinger
@ 2010-07-28  5:23             ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Simek @ 2010-07-28  5:23 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Andrew Morton, rostedt, linux-kernel, tglx, mingo, linux-arch

Mike Frysinger wrote:
> On Tue, Jul 27, 2010 at 19:18, Andrew Morton wrote:
>> On Mon, 26 Jul 2010 10:49:50 +0200 Michal Simek wrote:
>>> start/stop_critical_timing function for preemptirqsoff, preemptoff
>>> and irqsoff tracers contains atomic_inc and atomic_dec operations.
>>>
>>> Atomic operations used local_irq_save/restore macros to ensure
>>> atomic access but they are traced by the same function which is causing
>>> recursion problem.
>>>
>>> The reason is when these tracers are turn ON then local_irq_save/restore
>>> macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off
>>> which call start/stop_critical_timing.
>>>
>>> Microblaze was affected because use generic atomic implementation.
>> Seems that this will also affect blackfin, mn10300 and score.  I guess
>> they aren't supporting tracing yet?
> 
> do you mean TRACE_IRQFLAGS_SUPPORT ?  Blackfin should ... my
> understanding was that arches just needed to implement asm/irqflags.h
> for it.

Blackin uses own include/asm/atomic.h implementation where shouldn't be 
a problem with irqflags tracer. Look at my second post.

Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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

* Re: [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore
  2010-07-28  5:20           ` Michal Simek
@ 2010-07-28  5:35             ` Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2010-07-28  5:35 UTC (permalink / raw)
  To: monstr; +Cc: Andrew Morton, rostedt, linux-kernel, tglx, mingo, linux-arch

On Wed, Jul 28, 2010 at 01:20, Michal Simek wrote:
> Andrew Morton wrote:
>> On Mon, 26 Jul 2010 10:49:50 +0200 Michal Simek wrote:
>>> Signed-off-by: Michal Simek <monstr@monstr.eu>
>>> Acked-by: Steven Rostedt <rostedt@goodmis.org>
>>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>>
>> hm, I wonder how my signoff got there.  Doesn't matter.
>
> http://lkml.org/lkml/2010/5/26/364

Sighed != Signed ;)
-mike

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

end of thread, other threads:[~2010-07-28  5:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1274863724-14906-1-git-send-email-monstr@monstr.eu>
     [not found] ` <1274863724-14906-2-git-send-email-monstr@monstr.eu>
     [not found]   ` <1274884963.22648.245.camel@gandalf.stny.rr.com>
     [not found]     ` <20100526100805.171b3c48.akpm@linux-foundation.org>
     [not found]       ` <4C4D4C2E.8010103@monstr.eu>
2010-07-27 23:18         ` [PATCH] asm-generic: Use raw_local_irq_save/restore instead local_irq_save/restore Andrew Morton
2010-07-27 23:54           ` Mike Frysinger
2010-07-27 23:54             ` Mike Frysinger
2010-07-28  5:23             ` Michal Simek
2010-07-28  5:20           ` Michal Simek
2010-07-28  5:35             ` Mike Frysinger

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).