[PATCH 1/1] ia64: Convert cpu_sibling_map to a per_cpu data array FIX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are two versions of per_cpu_init() for ia64.  This patch corrects
the problem that one of the versions did not insert the boot cpu
into the cpu sibling and core maps.

Signed-off-by: Mike Travis <[email protected]>
---
 arch/ia64/kernel/setup.c |    8 ++++++++
 arch/ia64/mm/contig.c    |    6 ------
 2 files changed, 8 insertions(+), 6 deletions(-)

--- linux.orig/arch/ia64/kernel/setup.c	2007-10-04 14:38:53.000000000 -0700
+++ linux/arch/ia64/kernel/setup.c	2007-10-04 14:51:46.289055433 -0700
@@ -873,6 +873,14 @@ cpu_init (void)
 	void *cpu_data;
 
 	cpu_data = per_cpu_init();
+	/*
+	 * insert boot cpu into sibling and core mapes
+	 * (must be done after per_cpu area is setup)
+	 */
+	if (smp_processor_id() == 0) {
+		cpu_set(0, per_cpu(cpu_sibling_map, 0));
+		cpu_set(0, cpu_core_map[0]);
+	}
 
 	/*
 	 * We set ar.k3 so that assembly code in MCA handler can compute
--- linux.orig/arch/ia64/mm/contig.c	2007-10-04 14:38:53.000000000 -0700
+++ linux/arch/ia64/mm/contig.c	2007-10-04 14:50:12.699513748 -0700
@@ -212,12 +212,6 @@ per_cpu_init (void)
 			cpu_data += PERCPU_PAGE_SIZE;
 			per_cpu(local_per_cpu_offset, cpu) = __per_cpu_offset[cpu];
 		}
-		/*
-		 * cpu_sibling_map is now a per_cpu variable - it needs to
-		 * be accessed after per_cpu_init() sets up the per_cpu area.
-		 */
-		cpu_set(0, per_cpu(cpu_sibling_map, 0));
-		cpu_set(0, cpu_core_map[0]);
 	}
 	return __per_cpu_start + __per_cpu_offset[smp_processor_id()];
 }

-- 
-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux