vserver 1.9.3
[linux-2.6.git] / kernel / cpu.c
index 72b984c..64b8ed3 100644 (file)
 DECLARE_MUTEX(cpucontrol);
 
 static struct notifier_block *cpu_chain;
-/*
- * Represents all cpu's present in the system
- * In systems capable of hotplug, this map could dynamically grow
- * as new cpu's are detected in the system via any platform specific
- * method, such as ACPI for e.g.
- */
-cpumask_t      cpu_present_map;
-EXPORT_SYMBOL(cpu_present_map);
 
 /* Need to know about CPUs going up/down? */
 int register_cpu_notifier(struct notifier_block *nb)
@@ -69,13 +61,13 @@ static inline void check_for_tasks(int cpu)
  * cpu' with certain environment variables set.  */
 static int cpu_run_sbin_hotplug(unsigned int cpu, const char *action)
 {
-       char *argv[3], *envp[5], cpu_str[12], action_str[32];
+       char *argv[3], *envp[6], cpu_str[12], action_str[32], devpath_str[40];
        int i;
 
        sprintf(cpu_str, "CPU=%d", cpu);
        sprintf(action_str, "ACTION=%s", action);
-       /* FIXME: Add DEVPATH. --RR */
-
+       sprintf(devpath_str, "DEVPATH=devices/system/cpu/cpu%d", cpu);
+       
        i = 0;
        argv[i++] = hotplug_path;
        argv[i++] = "cpu";
@@ -87,6 +79,7 @@ static int cpu_run_sbin_hotplug(unsigned int cpu, const char *action)
        envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
        envp[i++] = cpu_str;
        envp[i++] = action_str;
+       envp[i++] = devpath_str;
        envp[i] = NULL;
 
        return call_usermodehelper(argv[0], argv, envp, 0);