-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
- Loading branch information
Showing
31 changed files
with
1,255 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
* | ||
* ia64 kernel NUMA specific stuff | ||
* | ||
* Copyright (C) 2002 Erich Focht <efocht@ess.nec.de> | ||
* Copyright (C) 2004 Silicon Graphics, Inc. | ||
* Jesse Barnes <jbarnes@sgi.com> | ||
*/ | ||
#include <linux/config.h> | ||
#include <linux/topology.h> | ||
#include <linux/module.h> | ||
#include <asm/processor.h> | ||
#include <asm/smp.h> | ||
|
||
u8 cpu_to_node_map[NR_CPUS] __cacheline_aligned; | ||
EXPORT_SYMBOL(cpu_to_node_map); | ||
|
||
cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned; | ||
|
||
/** | ||
* build_cpu_to_node_map - setup cpu to node and node to cpumask arrays | ||
* | ||
* Build cpu to node mapping and initialize the per node cpu masks using | ||
* info from the node_cpuid array handed to us by ACPI. | ||
*/ | ||
void __init build_cpu_to_node_map(void) | ||
{ | ||
int cpu, i, node; | ||
|
||
for(node=0; node < MAX_NUMNODES; node++) | ||
cpus_clear(node_to_cpu_mask[node]); | ||
|
||
for(cpu = 0; cpu < NR_CPUS; ++cpu) { | ||
node = -1; | ||
for (i = 0; i < NR_CPUS; ++i) | ||
if (cpu_physical_id(cpu) == node_cpuid[i].phys_id) { | ||
node = node_cpuid[i].nid; | ||
break; | ||
} | ||
cpu_to_node_map[cpu] = (node >= 0) ? node : 0; | ||
if (node >= 0) | ||
cpu_set(cpu, node_to_cpu_mask[node]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.