Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-17 Thread Ingo Molnar

* Roel Kluin <[EMAIL PROTECTED]> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-17 Thread Ingo Molnar

* Roel Kluin [EMAIL PROTECTED] 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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-16 Thread Roel Kluin
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 <[EMAIL PROTECTED]>
---
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.  */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-16 Thread Roel Kluin
Roel Kluin wrote:
> Replace !likely(x) by likely(!x)
> 
> Signed-off-by: Roel Kluin <[EMAIL PROTECTED]>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-16 Thread Roel Kluin
Replace !likely(x) by likely(!x)

Signed-off-by: Roel Kluin <[EMAIL PROTECTED]>
---
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.  */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-16 Thread Roel Kluin
Replace !likely(x) by likely(!x)

Signed-off-by: Roel Kluin [EMAIL PROTECTED]
---
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.  */
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-16 Thread Roel Kluin
Roel Kluin wrote:
 Replace !likely(x) by likely(!x)
 
 Signed-off-by: Roel Kluin [EMAIL PROTECTED]
 ---
 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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 1/2] [x86] arch/x86/kernel/signal_32.c: replace !likely(x) by likely(!x)

2008-02-16 Thread Roel Kluin
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 [EMAIL PROTECTED]
---
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.  */
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/