All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] um: Fix IRQ flag handling naming
@ 2010-10-25 15:24 Richard Weinberger
  2010-10-25 19:29   ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2010-10-25 15:24 UTC (permalink / raw)
  To: akpm
  Cc: linux-kernel, jdike, user-mode-linux-devel, dhowells, jkosina,
	jan.kiszka, xiyou.wangcong, Richard Weinberger

Commit df9ee292 changed the IRQ flag handling naming scheme
and broke UML.
This patch brings the new scheme to UML and makes it work again.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/um/include/asm/system.h |   49 +++++++++++++++++++++++++++--------------
 1 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/arch/um/include/asm/system.h b/arch/um/include/asm/system.h
index 93af1cf..68a90ec 100644
--- a/arch/um/include/asm/system.h
+++ b/arch/um/include/asm/system.h
@@ -8,23 +8,38 @@ extern int set_signals(int enable);
 extern void block_signals(void);
 extern void unblock_signals(void);
 
-#define local_save_flags(flags) do { typecheck(unsigned long, flags); \
-				     (flags) = get_signals(); } while(0)
-#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \
-				      set_signals(flags); } while(0)
-
-#define local_irq_save(flags) do { local_save_flags(flags); \
-                                   local_irq_disable(); } while(0)
-
-#define local_irq_enable() unblock_signals()
-#define local_irq_disable() block_signals()
-
-#define irqs_disabled()                 \
-({                                      \
-        unsigned long flags;            \
-        local_save_flags(flags);        \
-        (flags == 0);                   \
-})
+static inline unsigned long arch_local_save_flags(void)
+{
+	return get_signals();
+}
+
+static inline void arch_local_irq_restore(unsigned long flags)
+{
+	set_signals(flags);
+}
+
+static inline void arch_local_irq_enable(void)
+{
+	unblock_signals();
+}
+
+static inline void arch_local_irq_disable(void)
+{
+	block_signals();
+}
+
+static inline unsigned long arch_local_irq_save(void)
+{
+	unsigned long flags;
+	flags = arch_local_save_flags();
+	arch_local_irq_disable();
+	return flags;
+}
+
+static inline bool arch_irqs_disabled(void)
+{
+	return arch_local_save_flags() == 0;
+}
 
 extern void *_switch_to(void *prev, void *next, void *last);
 #define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
-- 
1.6.6.1


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

* Re: [uml-devel] [PATCH] um: Fix IRQ flag handling naming
  2010-10-25 15:24 [PATCH] um: Fix IRQ flag handling naming Richard Weinberger
@ 2010-10-25 19:29   ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2010-10-25 19:29 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: user-mode-linux-devel, jkosina, jdike, linux-kernel, dhowells,
	jan.kiszka, xiyou.wangcong

On Mon, 25 Oct 2010 17:24:33 +0200
Richard Weinberger <richard@nod.at> wrote:

> Commit df9ee292 changed the IRQ flag handling naming scheme
> and broke UML.
> This patch brings the new scheme to UML and makes it work again.
> 

Please always fully describe a bug when fixing it.  Something more than
"broke".  In the case of compilation errors or warnings, that means
quoting the compiler error output and, if necessary, the means of
reproducing it (config, compiler version, etc).

I did an allnoconfig uml build and saw this:

In file included from /usr/src/25/arch/um/include/asm/fixmap.h:5,
                 from /usr/src/25/arch/um/include/shared/um_uaccess.h:10,
                 from /usr/src/25/arch/um/include/asm/uaccess.h:41,
                 from /usr/src/25/arch/um/include/asm/thread_info.h:13,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from init/main.c:13:
/usr/src/25/arch/um/include/asm/system.h:11:1: warning: "local_save_flags" redefined

which I shall assume is the error which this patch addresses.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


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

* Re: [PATCH] um: Fix IRQ flag handling naming
@ 2010-10-25 19:29   ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2010-10-25 19:29 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-kernel, jdike, user-mode-linux-devel, dhowells, jkosina,
	jan.kiszka, xiyou.wangcong

On Mon, 25 Oct 2010 17:24:33 +0200
Richard Weinberger <richard@nod.at> wrote:

> Commit df9ee292 changed the IRQ flag handling naming scheme
> and broke UML.
> This patch brings the new scheme to UML and makes it work again.
> 

Please always fully describe a bug when fixing it.  Something more than
"broke".  In the case of compilation errors or warnings, that means
quoting the compiler error output and, if necessary, the means of
reproducing it (config, compiler version, etc).

I did an allnoconfig uml build and saw this:

In file included from /usr/src/25/arch/um/include/asm/fixmap.h:5,
                 from /usr/src/25/arch/um/include/shared/um_uaccess.h:10,
                 from /usr/src/25/arch/um/include/asm/uaccess.h:41,
                 from /usr/src/25/arch/um/include/asm/thread_info.h:13,
                 from include/linux/thread_info.h:56,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from init/main.c:13:
/usr/src/25/arch/um/include/asm/system.h:11:1: warning: "local_save_flags" redefined

which I shall assume is the error which this patch addresses.

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

* Re: [uml-devel] [PATCH] um: Fix IRQ flag handling naming
  2010-10-25 19:29   ` Andrew Morton
@ 2010-10-25 19:38     ` Richard Weinberger
  -1 siblings, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2010-10-25 19:38 UTC (permalink / raw)
  To: Andrew Morton, xiyou.wangcong
  Cc: dhowells, jkosina, jdike, linux-kernel, user-mode-linux-devel

Am Montag 25 Oktober 2010, 21:29:36 schrieb Andrew Morton:
> On Mon, 25 Oct 2010 17:24:33 +0200
> 
> Richard Weinberger <richard@nod.at> wrote:
> > Commit df9ee292 changed the IRQ flag handling naming scheme
> > and broke UML.
> > This patch brings the new scheme to UML and makes it work again.
> 
> Please always fully describe a bug when fixing it.  Something more than
> "broke".  In the case of compilation errors or warnings, that means
> quoting the compiler error output and, if necessary, the means of
> reproducing it (config, compiler version, etc).

Sorry!
I forgot to add the LKML-Reference to my initial report.

LKML-Reference: <201010190141.10365.richard () nod ! at>
 
> I did an allnoconfig uml build and saw this:
> 
> In file included from /usr/src/25/arch/um/include/asm/fixmap.h:5,
>                  from /usr/src/25/arch/um/include/shared/um_uaccess.h:10,
>                  from /usr/src/25/arch/um/include/asm/uaccess.h:41,
>                  from /usr/src/25/arch/um/include/asm/thread_info.h:13,
>                  from include/linux/thread_info.h:56,
>                  from include/linux/preempt.h:9,
>                  from include/linux/spinlock.h:50,
>                  from include/linux/seqlock.h:29,
>                  from include/linux/time.h:8,
>                  from include/linux/stat.h:60,
>                  from include/linux/module.h:10,
>                  from init/main.c:13:
> /usr/src/25/arch/um/include/asm/system.h:11:1: warning: "local_save_flags"
> redefined
> 
> which I shall assume is the error which this patch addresses.

Yes, this is the error.

Thanks,
//richard

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


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

* Re: [PATCH] um: Fix IRQ flag handling naming
@ 2010-10-25 19:38     ` Richard Weinberger
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2010-10-25 19:38 UTC (permalink / raw)
  To: Andrew Morton, xiyou.wangcong
  Cc: linux-kernel, jdike, user-mode-linux-devel, dhowells, jkosina

Am Montag 25 Oktober 2010, 21:29:36 schrieb Andrew Morton:
> On Mon, 25 Oct 2010 17:24:33 +0200
> 
> Richard Weinberger <richard@nod.at> wrote:
> > Commit df9ee292 changed the IRQ flag handling naming scheme
> > and broke UML.
> > This patch brings the new scheme to UML and makes it work again.
> 
> Please always fully describe a bug when fixing it.  Something more than
> "broke".  In the case of compilation errors or warnings, that means
> quoting the compiler error output and, if necessary, the means of
> reproducing it (config, compiler version, etc).

Sorry!
I forgot to add the LKML-Reference to my initial report.

LKML-Reference: <201010190141.10365.richard () nod ! at>
 
> I did an allnoconfig uml build and saw this:
> 
> In file included from /usr/src/25/arch/um/include/asm/fixmap.h:5,
>                  from /usr/src/25/arch/um/include/shared/um_uaccess.h:10,
>                  from /usr/src/25/arch/um/include/asm/uaccess.h:41,
>                  from /usr/src/25/arch/um/include/asm/thread_info.h:13,
>                  from include/linux/thread_info.h:56,
>                  from include/linux/preempt.h:9,
>                  from include/linux/spinlock.h:50,
>                  from include/linux/seqlock.h:29,
>                  from include/linux/time.h:8,
>                  from include/linux/stat.h:60,
>                  from include/linux/module.h:10,
>                  from init/main.c:13:
> /usr/src/25/arch/um/include/asm/system.h:11:1: warning: "local_save_flags"
> redefined
> 
> which I shall assume is the error which this patch addresses.

Yes, this is the error.

Thanks,
//richard

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

end of thread, other threads:[~2010-10-25 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 15:24 [PATCH] um: Fix IRQ flag handling naming Richard Weinberger
2010-10-25 19:29 ` [uml-devel] " Andrew Morton
2010-10-25 19:29   ` Andrew Morton
2010-10-25 19:38   ` [uml-devel] " Richard Weinberger
2010-10-25 19:38     ` Richard Weinberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.