x86, ioapic, acpi: add a knob to disable IRQ 0 through I/O APIC
[safe/jmp/linux-2.6] / arch / x86 / kernel / acpi / cstate.c
index 2d39f55..c2502eb 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/i386/kernel/acpi/cstate.c
- *
  * Copyright (C) 2005 Intel Corporation
  *     Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
  *     - Added _PDC for SMP C-states on Intel CPUs
@@ -29,7 +27,7 @@
 void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
                                        unsigned int cpu)
 {
-       struct cpuinfo_x86 *c = cpu_data + cpu;
+       struct cpuinfo_x86 *c = &cpu_data(cpu);
 
        flags->bm_check = 0;
        if (num_online_cpus() == 1)
@@ -72,7 +70,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
                struct acpi_processor_cx *cx, struct acpi_power_register *reg)
 {
        struct cstate_entry *percpu_entry;
-       struct cpuinfo_x86 *c = cpu_data + cpu;
+       struct cpuinfo_x86 *c = &cpu_data(cpu);
 
        cpumask_t saved_mask;
        int retval;
@@ -93,7 +91,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
 
        /* Make sure we are running on right CPU */
        saved_mask = current->cpus_allowed;
-       retval = set_cpus_allowed(current, cpumask_of_cpu(cpu));
+       retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
        if (retval)
                return -1;
 
@@ -126,9 +124,11 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
                printk(KERN_DEBUG "Monitor-Mwait will be used to enter C-%d "
                       "state\n", cx->type);
        }
+       snprintf(cx->desc, ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
+                cx->address);
 
 out:
-       set_cpus_allowed(current, saved_mask);
+       set_cpus_allowed_ptr(current, &saved_mask);
        return retval;
 }
 EXPORT_SYMBOL_GPL(acpi_processor_ffh_cstate_probe);