aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 21:07:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-19 21:07:31 -0400
commit13588209aa90d9c8e502750fc86160314555612f (patch)
tree91f5514aebf7244886070a6894c8e86c2b7ff4ce /drivers/acpi
parentac2941f59a38eeb535e1f227a8f90d7fe6b7828b (diff)
parentdc382fd5bcca7098a984705ed6ac880f539d068e (diff)
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (50 commits) x86, mm: Allow ZONE_DMA to be configurable x86, NUMA: Trim numa meminfo with max_pfn in a separate loop x86, NUMA: Rename setup_node_bootmem() to setup_node_data() x86, NUMA: Enable emulation on 32bit too x86, NUMA: Enable CONFIG_AMD_NUMA on 32bit too x86, NUMA: Rename amdtopology_64.c to amdtopology.c x86, NUMA: Make numa_init_array() static x86, NUMA: Make 32bit use common NUMA init path x86, NUMA: Initialize and use remap allocator from setup_node_bootmem() x86-32, NUMA: Add @start and @end to init_alloc_remap() x86, NUMA: Remove long 64bit assumption from numa.c x86, NUMA: Enable build of generic NUMA init code on 32bit x86, NUMA: Move NUMA init logic from numa_64.c to numa.c x86-32, NUMA: Update numaq to use new NUMA init protocol x86-32, NUMA: Replace srat_32.c with srat.c x86-32, NUMA: implement temporary NUMA init shims x86, NUMA: Move numa_nodes_parsed to numa.[hc] x86-32, NUMA: Move get_memcfg_numa() into numa_32.c x86, NUMA: make srat.c 32bit safe x86, NUMA: rename srat_64.c to srat.c ...
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_throttling.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index ad350173956..605a2954ef1 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -710,20 +710,14 @@ static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr)
710} 710}
711 711
712#ifdef CONFIG_X86 712#ifdef CONFIG_X86
713static int acpi_throttling_rdmsr(struct acpi_processor *pr, 713static int acpi_throttling_rdmsr(u64 *value)
714 u64 *value)
715{ 714{
716 struct cpuinfo_x86 *c;
717 u64 msr_high, msr_low; 715 u64 msr_high, msr_low;
718 unsigned int cpu;
719 u64 msr = 0; 716 u64 msr = 0;
720 int ret = -1; 717 int ret = -1;
721 718
722 cpu = pr->id; 719 if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) ||
723 c = &cpu_data(cpu); 720 !this_cpu_has(X86_FEATURE_ACPI)) {
724
725 if ((c->x86_vendor != X86_VENDOR_INTEL) ||
726 !cpu_has(c, X86_FEATURE_ACPI)) {
727 printk(KERN_ERR PREFIX 721 printk(KERN_ERR PREFIX
728 "HARDWARE addr space,NOT supported yet\n"); 722 "HARDWARE addr space,NOT supported yet\n");
729 } else { 723 } else {
@@ -738,18 +732,13 @@ static int acpi_throttling_rdmsr(struct acpi_processor *pr,
738 return ret; 732 return ret;
739} 733}
740 734
741static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value) 735static int acpi_throttling_wrmsr(u64 value)
742{ 736{
743 struct cpuinfo_x86 *c;
744 unsigned int cpu;
745 int ret = -1; 737 int ret = -1;
746 u64 msr; 738 u64 msr;
747 739
748 cpu = pr->id; 740 if ((this_cpu_read(cpu_info.x86_vendor) != X86_VENDOR_INTEL) ||
749 c = &cpu_data(cpu); 741 !this_cpu_has(X86_FEATURE_ACPI)) {
750
751 if ((c->x86_vendor != X86_VENDOR_INTEL) ||
752 !cpu_has(c, X86_FEATURE_ACPI)) {
753 printk(KERN_ERR PREFIX 742 printk(KERN_ERR PREFIX
754 "HARDWARE addr space,NOT supported yet\n"); 743 "HARDWARE addr space,NOT supported yet\n");
755 } else { 744 } else {
@@ -761,15 +750,14 @@ static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
761 return ret; 750 return ret;
762} 751}
763#else 752#else
764static int acpi_throttling_rdmsr(struct acpi_processor *pr, 753static int acpi_throttling_rdmsr(u64 *value)
765 u64 *value)
766{ 754{
767 printk(KERN_ERR PREFIX 755 printk(KERN_ERR PREFIX
768 "HARDWARE addr space,NOT supported yet\n"); 756 "HARDWARE addr space,NOT supported yet\n");
769 return -1; 757 return -1;
770} 758}
771 759
772static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value) 760static int acpi_throttling_wrmsr(u64 value)
773{ 761{
774 printk(KERN_ERR PREFIX 762 printk(KERN_ERR PREFIX
775 "HARDWARE addr space,NOT supported yet\n"); 763 "HARDWARE addr space,NOT supported yet\n");
@@ -801,7 +789,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr,
801 ret = 0; 789 ret = 0;
802 break; 790 break;
803 case ACPI_ADR_SPACE_FIXED_HARDWARE: 791 case ACPI_ADR_SPACE_FIXED_HARDWARE:
804 ret = acpi_throttling_rdmsr(pr, value); 792 ret = acpi_throttling_rdmsr(value);
805 break; 793 break;
806 default: 794 default:
807 printk(KERN_ERR PREFIX "Unknown addr space %d\n", 795 printk(KERN_ERR PREFIX "Unknown addr space %d\n",
@@ -834,7 +822,7 @@ static int acpi_write_throttling_state(struct acpi_processor *pr,
834 ret = 0; 822 ret = 0;
835 break; 823 break;
836 case ACPI_ADR_SPACE_FIXED_HARDWARE: 824 case ACPI_ADR_SPACE_FIXED_HARDWARE:
837 ret = acpi_throttling_wrmsr(pr, value); 825 ret = acpi_throttling_wrmsr(value);
838 break; 826 break;
839 default: 827 default:
840 printk(KERN_ERR PREFIX "Unknown addr space %d\n", 828 printk(KERN_ERR PREFIX "Unknown addr space %d\n",