/[gentoo-x86]/sys-power/phc-intel/files/phc-intel-0.3.2-rev15-3.16.patch
Gentoo

Contents of /sys-power/phc-intel/files/phc-intel-0.3.2-rev15-3.16.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Aug 4 10:21:25 2014 UTC (4 months, 2 weeks ago) by xmw
Branch: MAIN
Revbump for kernel 3.16 support.

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

1 Upstream changes
2
3 --- phc-intel-pack-rev15.1/inc/3.16/acpi-cpufreq.c
4 +++ phc-intel-pack-rev15.1/inc/3.16/acpi-cpufreq.c
5 @@ -213,7 +213,7 @@
6
7 static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data)
8 {
9 - int i;
10 + struct cpufreq_frequency_table *pos;
11 struct acpi_processor_performance *perf;
12
13 if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
14 @@ -223,10 +223,9 @@
15
16 perf = data->acpi_data;
17
18 - for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
19 - if (msr == perf->states[data->freq_table[i].driver_data].status)
20 - return data->freq_table[i].frequency;
21 - }
22 + cpufreq_for_each_entry(pos, data->freq_table)
23 + if (msr == perf->states[pos->driver_data].status)
24 + return pos->frequency;
25 return data->freq_table[0].frequency;
26 }
27
28 Use of cpufreq_for_each_entry macro
29
30 --- phc-intel-pack-rev15.1/inc/3.16/linux-phc-0.3.2.patch
31 +++ phc-intel-pack-rev15.1/inc/3.16/linux-phc-0.3.2.patch
32 @@ -31,39 +31,37 @@
33
34 static DEFINE_PER_CPU(struct acpi_cpufreq_data *, acfreq_data);
35 @@ -216,16 +225,25 @@
36 - int i;
37 + struct cpufreq_frequency_table *pos;
38 struct acpi_processor_performance *perf;
39
40 - if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
41 + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
42 msr &= AMD_MSR_RANGE;
43 - else
44 -- msr &= INTEL_MSR_RANGE;
45 --
46 -- perf = data->acpi_data;
47 + perf = data->acpi_data;
48 -
49 -- for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
50 -- if (msr == perf->states[data->freq_table[i].driver_data].status)
51 -- return data->freq_table[i].frequency;
52 -+ for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
53 -+ if (msr == perf->states[data->freq_table[i].driver_data].status)
54 -+ return data->freq_table[i].frequency;
55 ++
56 ++ cpufreq_for_each_entry(pos, data->freq_table)
57 ++ if (msr == perf->states[pos->driver_data].status)
58 ++ return pos->frequency;
59 -+ }
60 -+ }
61 -+ else {
62 -+ msr &= INTEL_MSR_RANGE;
63 ++
64 ++ } else {
65 + u32 fid;
66 + msr &= INTEL_MSR_RANGE;
67 + fid = msr & INTEL_MSR_FID_MASK;
68 + perf = data->acpi_data;
69 -+
70 -+ for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
71 -+ if (fid == (perf->states[data->freq_table[i].driver_data].status & INTEL_MSR_FID_MASK))
72 -+ return data->freq_table[i].frequency;
73 -+ }
74 - }
75 +
76 +- perf = data->acpi_data;
77 ++ cpufreq_for_each_entry(pos, data->freq_table)
78 ++ if (fid == (perf->states[pos->driver_data].status & INTEL_MSR_FID_MASK))
79 ++ return pos->frequency;
80 ++ }
81 +
82 +- cpufreq_for_each_entry(pos, data->freq_table)
83 +- if (msr == perf->states[pos->driver_data].status)
84 +- return pos->frequency;
85 return data->freq_table[0].frequency;
86 }
87 +
88 @@ -406,6 +424,99 @@
89 return 0;
90 }

  ViewVC Help
Powered by ViewVC 1.1.20