mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
cpu hotplug: topology: remove topology_dev_map
By previous cpu hotplug notifier change, we don't need to track topology_dev existence for each cpu by topology_dev_map. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Gautham R Shenoy <ego@in.ibm.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a0d8cdb652
commit
9780e3e968
1 changed files with 1 additions and 10 deletions
|
@ -94,27 +94,18 @@ static struct attribute_group topology_attr_group = {
|
||||||
.name = "topology"
|
.name = "topology"
|
||||||
};
|
};
|
||||||
|
|
||||||
static cpumask_t topology_dev_map = CPU_MASK_NONE;
|
|
||||||
|
|
||||||
/* Add/Remove cpu_topology interface for CPU device */
|
/* Add/Remove cpu_topology interface for CPU device */
|
||||||
static int __cpuinit topology_add_dev(unsigned int cpu)
|
static int __cpuinit topology_add_dev(unsigned int cpu)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
struct sys_device *sys_dev = get_cpu_sysdev(cpu);
|
struct sys_device *sys_dev = get_cpu_sysdev(cpu);
|
||||||
|
|
||||||
rc = sysfs_create_group(&sys_dev->kobj, &topology_attr_group);
|
return sysfs_create_group(&sys_dev->kobj, &topology_attr_group);
|
||||||
if (!rc)
|
|
||||||
cpu_set(cpu, topology_dev_map);
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __cpuinit topology_remove_dev(unsigned int cpu)
|
static void __cpuinit topology_remove_dev(unsigned int cpu)
|
||||||
{
|
{
|
||||||
struct sys_device *sys_dev = get_cpu_sysdev(cpu);
|
struct sys_device *sys_dev = get_cpu_sysdev(cpu);
|
||||||
|
|
||||||
if (!cpu_isset(cpu, topology_dev_map))
|
|
||||||
return;
|
|
||||||
cpu_clear(cpu, topology_dev_map);
|
|
||||||
sysfs_remove_group(&sys_dev->kobj, &topology_attr_group);
|
sysfs_remove_group(&sys_dev->kobj, &topology_attr_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue