| * arch/sh/kernel/topology.c |
| * Copyright (C) 2007 Paul Mundt |
| * This file is subject to the terms and conditions of the GNU General Public |
| * License. See the file "COPYING" in the main directory of this archive |
| #include <linux/cpumask.h> |
| #include <linux/percpu.h> |
| #include <linux/nodemask.h> |
| static DEFINE_PER_CPU(struct cpu, cpu_devices); |
| static int __init topology_init(void) |
| #ifdef CONFIG_NEED_MULTIPLE_NODES |
| for_each_present_cpu(i) { |
| ret = register_cpu(&per_cpu(cpu_devices, i), i); |
| printk(KERN_WARNING "%s: register_cpu %d failed (%d)\n", |
| #if defined(CONFIG_NUMA) && !defined(CONFIG_SMP) |
| * In the UP case, make sure the CPU association is still |
| * registered under each node. Without this, sysfs fails |
| * to make the connection between nodes other than node0 |
| register_cpu_under_node(raw_smp_processor_id(), i); |
| subsys_initcall(topology_init); |