diff options
Diffstat (limited to 'arch/sh/kernel/topology.c')
-rw-r--r-- | arch/sh/kernel/topology.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c index 9687b02caf4b..9b5844a1bdaa 100644 --- a/arch/sh/kernel/topology.c +++ b/arch/sh/kernel/topology.c | |||
@@ -1,3 +1,12 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/topology.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
1 | #include <linux/cpu.h> | 10 | #include <linux/cpu.h> |
2 | #include <linux/cpumask.h> | 11 | #include <linux/cpumask.h> |
3 | #include <linux/init.h> | 12 | #include <linux/init.h> |
@@ -23,6 +32,18 @@ static int __init topology_init(void) | |||
23 | __FUNCTION__, i, ret); | 32 | __FUNCTION__, i, ret); |
24 | } | 33 | } |
25 | 34 | ||
35 | #if defined(CONFIG_NUMA) && !defined(CONFIG_SMP) | ||
36 | /* | ||
37 | * In the UP case, make sure the CPU association is still | ||
38 | * registered under each node. Without this, sysfs fails | ||
39 | * to make the connection between nodes other than node0 | ||
40 | * and cpu0. | ||
41 | */ | ||
42 | for_each_online_node(i) | ||
43 | if (i != numa_node_id()) | ||
44 | register_cpu_under_node(raw_smp_processor_id(), i); | ||
45 | #endif | ||
46 | |||
26 | return 0; | 47 | return 0; |
27 | } | 48 | } |
28 | subsys_initcall(topology_init); | 49 | subsys_initcall(topology_init); |