mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PULL] x86 cpumask work
@ 2009-03-17 18:56 Cliff Wickman
  2009-03-17 21:52 ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Cliff Wickman @ 2009-03-17 18:56 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, rusty, travis, steiner


From: Cliff Wickman <cpw@sgi.com>

A patch on Mar13 2009 introduced a bug. I hope the below 1-line fix can
make the 'urgent' list, and get fixed before that patch moves on.

The Mar13 patch is saved at
http://marc.info/?l=linux-kernel&m=123683186504948&w=2

The allocation of per-cpu uv_flush_tlb_mask's in arch/x86/kernel/tlb_uv.c
changed a variable that should been reset to 0.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Acked-by: Mike Travis <travis@sgi.com>
---
 arch/x86/kernel/tlb_uv.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux/arch/x86/kernel/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/kernel/tlb_uv.c	2009-03-16 11:14:40.000000000 -0500
+++ linux/arch/x86/kernel/tlb_uv.c	2009-03-16 11:15:38.000000000 -0500
@@ -777,6 +777,7 @@ static int __init uv_bau_init(void)
 	BUG_ON(!uv_bau_table_bases);
 
 	last_blade = -1;
+	cur_cpu = 0;
 	for_each_online_node(node) {
 		blade = uv_node_to_blade_id(node);
 		if (blade == last_blade)

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

* Re: [PULL] x86 cpumask work
  2009-03-17 18:56 [PULL] x86 cpumask work Cliff Wickman
@ 2009-03-17 21:52 ` Rusty Russell
  2009-03-18  8:51   ` [tip:x86/uv] x86, uv: fix cpumask iterator in uv_bau_init() Rusty Russell
  2009-03-18 12:57   ` [PULL] x86 cpumask work Cliff Wickman
  0 siblings, 2 replies; 4+ messages in thread
From: Rusty Russell @ 2009-03-17 21:52 UTC (permalink / raw)
  To: Cliff Wickman; +Cc: mingo, linux-kernel, travis, steiner

On Wednesday 18 March 2009 05:26:30 Cliff Wickman wrote:
> 
> From: Cliff Wickman <cpw@sgi.com>
> 
> A patch on Mar13 2009 introduced a bug. I hope the below 1-line fix can
> make the 'urgent' list, and get fixed before that patch moves on.
> 
> The Mar13 patch is saved at
> http://marc.info/?l=linux-kernel&m=123683186504948&w=2
> 
> The allocation of per-cpu uv_flush_tlb_mask's in arch/x86/kernel/tlb_uv.c
> changed a variable that should been reset to 0.

Hi Cliff,

   Thanks for tracking this.  May I suggest this slightly enhanced version?

Subject: cpumask: fix tlb_uv initialization

Impact: fix boot on UV systems

Commit 76ba0ecda0de9accea9a91cb6dbde46782110e1c "cpumask: use cpumask_var_t
in uv_flush_tlb_others" used cur_cpu as an iterator; it was supposed to be
zero for the code below it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 8afb691..deb5ebb 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -751,7 +751,7 @@ static int __init uv_bau_init(void)
 	int node;
 	int nblades;
 	int last_blade;
-	int cur_cpu = 0;
+	int cur_cpu;
 
 	if (!is_uv_system())
 		return 0;
@@ -765,6 +765,7 @@ static int __init uv_bau_init(void)
 	uv_mmask = (1UL << uv_hub_info->n_val) - 1;
 	nblades = 0;
 	last_blade = -1;
+	cur_cpu = 0;
 	for_each_online_node(node) {
 		blade = uv_node_to_blade_id(node);
 		if (blade == last_blade)


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

* [tip:x86/uv] x86, uv: fix cpumask iterator in uv_bau_init()
  2009-03-17 21:52 ` Rusty Russell
@ 2009-03-18  8:51   ` Rusty Russell
  2009-03-18 12:57   ` [PULL] x86 cpumask work Cliff Wickman
  1 sibling, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2009-03-18  8:51 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, travis, rusty, cpw, stable, tglx, mingo

Commit-ID:  2c74d66624ddbda8101d54d1e184cf9229b378bc
Gitweb:     http://git.kernel.org/tip/2c74d66624ddbda8101d54d1e184cf9229b378bc
Author:     Rusty Russell <rusty@rustcorp.com.au>
AuthorDate: Wed, 18 Mar 2009 08:22:30 +1030
Commit:     Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 18 Mar 2009 09:47:54 +0100

x86, uv: fix cpumask iterator in uv_bau_init()

Impact: fix boot crash on UV systems

Commit 76ba0ecda0de9accea9a91cb6dbde46782110e1c "cpumask: use
cpumask_var_t in uv_flush_tlb_others" used cur_cpu as an iterator;
it was supposed to be zero for the code below it.

Reported-by: Cliff Wickman <cpw@sgi.com>
Original-From: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Mike Travis <travis@sgi.com>
Cc: steiner@sgi.com
Cc: <stable@kernel.org>
LKML-Reference: <200903180822.31196.rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/kernel/tlb_uv.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index d038b9c..79c0732 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -750,7 +750,7 @@ static int __init uv_bau_init(void)
 	int node;
 	int nblades;
 	int last_blade;
-	int cur_cpu = 0;
+	int cur_cpu;
 
 	if (!is_uv_system())
 		return 0;
@@ -760,6 +760,7 @@ static int __init uv_bau_init(void)
 	uv_mmask = (1UL << uv_hub_info->n_val) - 1;
 	nblades = 0;
 	last_blade = -1;
+	cur_cpu = 0;
 	for_each_online_node(node) {
 		blade = uv_node_to_blade_id(node);
 		if (blade == last_blade)

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

* Re: [PULL] x86 cpumask work
  2009-03-17 21:52 ` Rusty Russell
  2009-03-18  8:51   ` [tip:x86/uv] x86, uv: fix cpumask iterator in uv_bau_init() Rusty Russell
@ 2009-03-18 12:57   ` Cliff Wickman
  1 sibling, 0 replies; 4+ messages in thread
From: Cliff Wickman @ 2009-03-18 12:57 UTC (permalink / raw)
  To: Rusty Russell; +Cc: mingo, linux-kernel, travis, steiner

Hi Rusty,

On Wed, Mar 18, 2009 at 08:22:30AM +1030, Rusty Russell wrote:
> On Wednesday 18 March 2009 05:26:30 Cliff Wickman wrote:
> > 
> > From: Cliff Wickman <cpw@sgi.com>
> > 
> > A patch on Mar13 2009 introduced a bug. I hope the below 1-line fix can
> > make the 'urgent' list, and get fixed before that patch moves on.
> > 
> > The Mar13 patch is saved at
> > http://marc.info/?l=linux-kernel&m=123683186504948&w=2
> > 
> > The allocation of per-cpu uv_flush_tlb_mask's in arch/x86/kernel/tlb_uv.c
> > changed a variable that should been reset to 0.
> 
> Hi Cliff,
> 
>    Thanks for tracking this.  May I suggest this slightly enhanced version?

Yes, I agree. No need for double initialization.

Thanks.
-Cliff

> 
> Subject: cpumask: fix tlb_uv initialization
> 
> Impact: fix boot on UV systems
> 
> Commit 76ba0ecda0de9accea9a91cb6dbde46782110e1c "cpumask: use cpumask_var_t
> in uv_flush_tlb_others" used cur_cpu as an iterator; it was supposed to be
> zero for the code below it.
> 
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
> index 8afb691..deb5ebb 100644
> --- a/arch/x86/kernel/tlb_uv.c
> +++ b/arch/x86/kernel/tlb_uv.c
> @@ -751,7 +751,7 @@ static int __init uv_bau_init(void)
>  	int node;
>  	int nblades;
>  	int last_blade;
> -	int cur_cpu = 0;
> +	int cur_cpu;
>  
>  	if (!is_uv_system())
>  		return 0;
> @@ -765,6 +765,7 @@ static int __init uv_bau_init(void)
>  	uv_mmask = (1UL << uv_hub_info->n_val) - 1;
>  	nblades = 0;
>  	last_blade = -1;
> +	cur_cpu = 0;
>  	for_each_online_node(node) {
>  		blade = uv_node_to_blade_id(node);
>  		if (blade == last_blade)

-- 
Cliff Wickman
Silicon Graphics, Inc.
cpw@sgi.com
(651) 683-3824

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

end of thread, other threads:[~2009-03-18 12:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-17 18:56 [PULL] x86 cpumask work Cliff Wickman
2009-03-17 21:52 ` Rusty Russell
2009-03-18  8:51   ` [tip:x86/uv] x86, uv: fix cpumask iterator in uv_bau_init() Rusty Russell
2009-03-18 12:57   ` [PULL] x86 cpumask work Cliff Wickman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome