From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>,
Alexey Dobriyan <adobriyan@gmail.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Richard Henderson <rth@twiddle.net>,
Greg Ungerer <gerg@uclinux.org>,
Linux/m68k <linux-m68k@vger.kernel.org>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] ftrace: handle archs that do not support irqs_disabled_flags
Date: Sat, 25 Oct 2008 10:24:11 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0810251018370.15317@anakin> (raw)
In-Reply-To: <alpine.DEB.1.10.0810240937130.3882@gandalf.stny.rr.com>
On Fri, 24 Oct 2008, Steven Rostedt wrote:
> Some architectures do not support a way to read the irq flags that
> is set from "local_irq_save(flags)" to determine if interrupts were
> disabled or enabled. Ftrace uses this information to display to the user
> if the trace occurred with interrupts enabled or disabled.
Both alpha
#define irqs_disabled() (getipl() == IPL_MAX)
and m68k
static inline int irqs_disabled(void)
{
unsigned long flags;
local_save_flags(flags);
return flags & ~ALLOWINT;
}
do have irqs_disabled(), but they don't have irqs_disabled_flags().
M68knommu has both, but they don't check the same thing:
#define irqs_disabled() \
({ \
unsigned long flags; \
local_save_flags(flags); \
((flags & 0x0700) == 0x0700); \
})
static inline int irqs_disabled_flags(unsigned long flags)
{
if (flags & 0x0700)
return 0;
else
return 1;
}
Is there a semantic difference between them (except that the latter takes the
flags as a parameter)?
Or can we just extract the core logic of irqs_disabled() into
irqs_disabled_flags()?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next parent reply other threads:[~2008-10-25 8:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081023213637.eff9b414.sfr@canb.auug.org.au>
[not found] ` <20081023121145.GB27984@x200.localdomain>
[not found] ` <c62985530810230548t1b569f61g34d1900bb94fde83@mail.gmail.com>
[not found] ` <c62985530810230615s3252a54ao6488e763d72dc939@mail.gmail.com>
[not found] ` <49008D12.5090204@gmail.com>
[not found] ` <Pine.LNX.4.64.0810231635440.18978@anakin>
[not found] ` <c62985530810230757r411b4e3dj4ecec649cf8cf0b3@mail.gmail.com>
[not found] ` <Pine.LNX.4.64.0810231727430.18978@anakin>
[not found] ` <4900B414.7090002@gmail.com>
[not found] ` <20081023163433.GA3160@x200.localdomain>
[not found] ` <20081023163850.GB16591@elte.hu>
[not found] ` <4901D8CD.7000405@gmail.com>
[not found] ` <alpine.DEB.1.10.0810240937130.3882@gandalf.stny.rr.com>
2008-10-25 8:24 ` Geert Uytterhoeven [this message]
2008-10-28 7:25 ` [PATCH] ftrace: handle archs that do not support irqs_disabled_flags Greg Ungerer
[not found] ` <20081030214910.GA14679@x200.localdomain>
2008-10-31 8:50 ` [PATCH] tracing: fix a build error on alpha and m68k Geert Uytterhoeven
2008-10-31 9:55 ` Ingo Molnar
2008-11-01 10:16 ` Geert Uytterhoeven
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=Pine.LNX.4.64.0810251018370.15317@anakin \
--to=geert@linux-m68k.org \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=gerg@uclinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=rth@twiddle.net \
--cc=sfr@canb.auug.org.au \
/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