LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)
@ 2008-02-16 15:50 Roel Kluin
  2008-02-16 19:28 ` Roel Kluin
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2008-02-16 15:50 UTC (permalink / raw)
  To: Thomas Gleixner, mingo, hpa; +Cc: lkml

Replace !likely(x) by likely(!x)

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index caee1f0..335872f 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -303,7 +303,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
 	 * If we are on the alternate signal stack and would overflow it, don't.
 	 * Return an always-bogus address instead so we will die with SIGSEGV.
 	 */
-	if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size)))
+	if (on_sig_stack(sp) && likely(!on_sig_stack(sp - frame_size)))
 		return (void __user *) -1L;
 
 	/* This is the X/Open sanctioned signal stack switching.  */

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

* Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)
  2008-02-16 15:50 [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x) Roel Kluin
@ 2008-02-16 19:28 ` Roel Kluin
  2008-02-16 19:56   ` Roel Kluin
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2008-02-16 19:28 UTC (permalink / raw)
  To: Thomas Gleixner, mingo, hpa; +Cc: lkml

Roel Kluin wrote:
> Replace !likely(x) by likely(!x)
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
> index caee1f0..335872f 100644
> --- a/arch/x86/kernel/signal_32.c
> +++ b/arch/x86/kernel/signal_32.c
> @@ -303,7 +303,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
>  	 * If we are on the alternate signal stack and would overflow it, don't.
>  	 * Return an always-bogus address instead so we will die with SIGSEGV.
>  	 */
> -	if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size)))
> +	if (on_sig_stack(sp) && likely(!on_sig_stack(sp - frame_size)))
>  		return (void __user *) -1L;
>  
>  	/* This is the X/Open sanctioned signal stack switching.  */
> --
sorry, please ignore this patch

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

* Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)
  2008-02-16 19:28 ` Roel Kluin
@ 2008-02-16 19:56   ` Roel Kluin
  2008-02-17 16:23     ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2008-02-16 19:56 UTC (permalink / raw)
  To: Thomas Gleixner, mingo, hpa; +Cc: lkml

Roel Kluin wrote:
> Roel Kluin wrote:
>> Replace !likely(x) by likely(!x)

> sorry, please ignore this patch

The patch below shouldn't change semantics.
---
replace !likely(x) by unlikely(!x)

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index caee1f0..c0fb075 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -303,7 +303,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
 	 * If we are on the alternate signal stack and would overflow it, don't.
 	 * Return an always-bogus address instead so we will die with SIGSEGV.
 	 */
-	if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size)))
+	if (on_sig_stack(sp) && unlikely(!on_sig_stack(sp - frame_size)))
 		return (void __user *) -1L;
 
 	/* This is the X/Open sanctioned signal stack switching.  */

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

* Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)
  2008-02-16 19:56   ` Roel Kluin
@ 2008-02-17 16:23     ` Ingo Molnar
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2008-02-17 16:23 UTC (permalink / raw)
  To: Roel Kluin; +Cc: Thomas Gleixner, mingo, hpa, lkml


* Roel Kluin <12o3l@tiscali.nl> wrote:

> -	if (on_sig_stack(sp) && !likely(on_sig_stack(sp - frame_size)))
> +	if (on_sig_stack(sp) && unlikely(!on_sig_stack(sp - frame_size)))

hm, what's the purpose of this change?

	Ingo

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

end of thread, other threads:[~2008-02-17 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-16 15:50 [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x) Roel Kluin
2008-02-16 19:28 ` Roel Kluin
2008-02-16 19:56   ` Roel Kluin
2008-02-17 16:23     ` Ingo Molnar

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