~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/acpi/processor_throttling.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
}
711
711
 
712
712
#ifdef CONFIG_X86
713
 
static int acpi_throttling_rdmsr(struct acpi_processor *pr,
714
 
                                        u64 *value)
 
713
static int acpi_throttling_rdmsr(u64 *value)
715
714
{
716
 
        struct cpuinfo_x86 *c;
717
715
        u64 msr_high, msr_low;
718
 
        unsigned int cpu;
719
716
        u64 msr = 0;
720
717
        int ret = -1;
721
718
 
722
 
        cpu = pr->id;
723
 
        c = &cpu_data(cpu);
724
 
 
725
 
        if ((c->x86_vendor != X86_VENDOR_INTEL) ||
726
 
                !cpu_has(c, X86_FEATURE_ACPI)) {
 
719
        if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) ||
 
720
                !this_cpu_has(X86_FEATURE_ACPI)) {
727
721
                printk(KERN_ERR PREFIX
728
722
                        "HARDWARE addr space,NOT supported yet\n");
729
723
        } else {
738
732
        return ret;
739
733
}
740
734
 
741
 
static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
 
735
static int acpi_throttling_wrmsr(u64 value)
742
736
{
743
 
        struct cpuinfo_x86 *c;
744
 
        unsigned int cpu;
745
737
        int ret = -1;
746
738
        u64 msr;
747
739
 
748
 
        cpu = pr->id;
749
 
        c = &cpu_data(cpu);
750
 
 
751
 
        if ((c->x86_vendor != X86_VENDOR_INTEL) ||
752
 
                !cpu_has(c, X86_FEATURE_ACPI)) {
 
740
        if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) ||
 
741
                !this_cpu_has(X86_FEATURE_ACPI)) {
753
742
                printk(KERN_ERR PREFIX
754
743
                        "HARDWARE addr space,NOT supported yet\n");
755
744
        } else {
761
750
        return ret;
762
751
}
763
752
#else
764
 
static int acpi_throttling_rdmsr(struct acpi_processor *pr,
765
 
                                u64 *value)
 
753
static int acpi_throttling_rdmsr(u64 *value)
766
754
{
767
755
        printk(KERN_ERR PREFIX
768
756
                "HARDWARE addr space,NOT supported yet\n");
769
757
        return -1;
770
758
}
771
759
 
772
 
static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
 
760
static int acpi_throttling_wrmsr(u64 value)
773
761
{
774
762
        printk(KERN_ERR PREFIX
775
763
                "HARDWARE addr space,NOT supported yet\n");
801
789
                ret = 0;
802
790
                break;
803
791
        case ACPI_ADR_SPACE_FIXED_HARDWARE:
804
 
                ret = acpi_throttling_rdmsr(pr, value);
 
792
                ret = acpi_throttling_rdmsr(value);
805
793
                break;
806
794
        default:
807
795
                printk(KERN_ERR PREFIX "Unknown addr space %d\n",
834
822
                ret = 0;
835
823
                break;
836
824
        case ACPI_ADR_SPACE_FIXED_HARDWARE:
837
 
                ret = acpi_throttling_wrmsr(pr, value);
 
825
                ret = acpi_throttling_wrmsr(value);
838
826
                break;
839
827
        default:
840
828
                printk(KERN_ERR PREFIX "Unknown addr space %d\n",
1164
1152
                         */
1165
1153
                        if (!match_pr->flags.throttling) {
1166
1154
                                ACPI_DEBUG_PRINT((ACPI_DB_INFO,
1167
 
                                        "Throttling Controll is unsupported "
 
1155
                                        "Throttling Control is unsupported "
1168
1156
                                        "on CPU %d\n", i));
1169
1157
                                continue;
1170
1158
                        }