public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
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

  parent reply	other threads:[~2008-10-25  8:24 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 10:36 linux-next: Tree for October 23 Stephen Rothwell
2008-10-23 12:11 ` linux-next: kernel/trace/trace.c:658: error: Alexey Dobriyan
2008-10-23 12:48   ` Frédéric Weisbecker
2008-10-23 13:15     ` Frédéric Weisbecker
2008-10-23 14:41       ` Frederic Weisbecker
2008-10-23 14:37         ` Geert Uytterhoeven
2008-10-23 14:57           ` Frédéric Weisbecker
2008-10-23 15:30             ` Geert Uytterhoeven
2008-10-23 15:33               ` Frédéric Weisbecker
2008-10-23 17:27               ` [PATCH] tracing: fix a build error on alpha and m68k Frederic Weisbecker
2008-10-23 16:24                 ` Frédéric Weisbecker
2008-10-23 16:34                 ` Alexey Dobriyan
2008-10-23 16:35                   ` Frédéric Weisbecker
2008-10-23 16:38                   ` Ingo Molnar
2008-10-23 16:51                     ` Frédéric Weisbecker
2008-10-23 16:55                       ` Ingo Molnar
2008-10-23 17:06                         ` Frédéric Weisbecker
2008-10-23 17:12                           ` Steven Rostedt
2008-10-23 17:25                             ` Frédéric Weisbecker
2008-10-24 14:16                     ` Frederic Weisbecker
2008-10-24 13:42                       ` [PATCH] ftrace: handle archs that do not support irqs_disabled_flags Steven Rostedt
2008-10-24 13:54                         ` Frédéric Weisbecker
2008-10-25  8:24                         ` Geert Uytterhoeven [this message]
2008-10-28  7:25                           ` Greg Ungerer
2008-10-23 17:14                   ` [PATCH] tracing: fix a build error on alpha and m68k Steven Rostedt
2008-10-30 21:49                   ` Alexey Dobriyan
2008-10-30 22:57                     ` Frédéric Weisbecker
2008-10-30 23:03                       ` Ingo Molnar
2008-10-31  8:50                     ` Geert Uytterhoeven
2008-10-31  9:55                       ` Ingo Molnar
2008-11-01 10:16                         ` Geert Uytterhoeven
2008-10-23 16:37                 ` Ingo Molnar
2008-10-23 12:15 ` linux-next: arch/alpha/include/asm/smp.h:48:1: error: "cpu_possible_map" redefined Alexey Dobriyan
2008-10-23 12:16   ` Alexey Dobriyan
2008-10-23 15:10     ` Rusty Russell
2008-10-23 12:22 ` linux-next: include/linux/mmzone.h:288: error: 'CONFIG_NR_CPUS' undeclared here (not in a function) Alexey Dobriyan
2008-10-23 14:38   ` Geert Uytterhoeven
2008-10-23 12:26 ` linux-next: undefined reference to 'forbid_dac' Alexey Dobriyan
2008-10-23 13:16   ` FUJITA Tomonori
2008-10-23 12:57 ` linux-next: undefined reference to `nop_trace' Alexey Dobriyan
2008-10-23 13:07 ` linux-next: arch/s390/kernel/smp.c:120: error: request for member 'bits' in something not a structure or union Alexey Dobriyan
2008-10-23 14:14 ` linux-next: x86_64 UML broken Alexey Dobriyan
2008-10-23 14:48 ` linux-next: drivers/lguest/page_tables.c:1044: error: invalid initializer Alexey Dobriyan
2008-10-24  2:08   ` Rusty Russell
2008-10-24  0:18 ` linux-next: Tree for October 23 (cx88) Randy Dunlap
2008-10-24  1:04 ` linux-next: Tree for October 23 Randy Dunlap
2008-10-26  7:19   ` [ofa-general] " Or Gerlitz
2008-10-26 18:49     ` Randy Dunlap
2008-10-24  1:14 ` [PATCH] PCI hotplug printk format Randy Dunlap
2008-10-24 17:42   ` Jesse Barnes
2008-10-24 17:49   ` Jesse Barnes
2008-10-24  1:17 ` [PATCH] nfsctl: credentials error Randy Dunlap
2008-10-24  1:17 ` [PATCH] coda: " Randy Dunlap

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$(echo .)org \
    --cc=adobriyan@gmail$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=fweisbec@gmail$(echo .)com \
    --cc=gerg@uclinux$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-m68k@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mingo@elte$(echo .)hu \
    --cc=rostedt@goodmis$(echo .)org \
    --cc=rth@twiddle$(echo .)net \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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