summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2011-03-16 23:19:43 +0000
committerMichael Weber <xmw@gentoo.org>2011-03-16 23:19:43 +0000
commitc8f2c41d26e31b54a90c2369501aff7523f2c7ce (patch)
tree906ef49bc09f168d04052a09ee1867048dd36807 /sys-power
parentVersion bump (bug #354851). (diff)
downloadhistorical-c8f2c41d26e31b54a90c2369501aff7523f2c7ce.tar.gz
historical-c8f2c41d26e31b54a90c2369501aff7523f2c7ce.tar.bz2
historical-c8f2c41d26e31b54a90c2369501aff7523f2c7ce.zip
New patch set for kernel 2.6.38
Package-Manager: portage-2.1.9.42/cvs/Linux x86_64
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/phc-intel/ChangeLog6
-rw-r--r--sys-power/phc-intel/Manifest5
-rw-r--r--sys-power/phc-intel/files/phc-intel-0.3.2.12.1-2.6.38.patch528
-rw-r--r--sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild4
4 files changed, 538 insertions, 5 deletions
diff --git a/sys-power/phc-intel/ChangeLog b/sys-power/phc-intel/ChangeLog
index 579b7640b14f..c3c9c31db52e 100644
--- a/sys-power/phc-intel/ChangeLog
+++ b/sys-power/phc-intel/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-power/phc-intel
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/phc-intel/ChangeLog,v 1.4 2011/01/05 19:19:13 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/phc-intel/ChangeLog,v 1.5 2011/03/16 23:19:43 xmw Exp $
+
+ 16 Mar 2011; Michael Weber <xmw@gentoo.org> phc-intel-0.3.2.12.1-r2.ebuild,
+ +files/phc-intel-0.3.2.12.1-2.6.38.patch:
+ New patch set for kernel 2.6.38
05 Jan 2011; Michael Weber <xmw@gentoo.org> phc-intel-0.3.2.12.1-r2.ebuild,
+files/phc-intel-0.3.2.12.1-2.6.37.patch:
diff --git a/sys-power/phc-intel/Manifest b/sys-power/phc-intel/Manifest
index c51ba1a637ed..0d0938c9f102 100644
--- a/sys-power/phc-intel/Manifest
+++ b/sys-power/phc-intel/Manifest
@@ -1,11 +1,12 @@
AUX phc-intel-0.3.2.12.1-2.6.35.patch 16089 RMD160 55922770688369b9c7eabb11727efa0832a28954 SHA1 8e645cd5e81ca630b478dc3c71980bb67a6bda25 SHA256 dee0ce62588bf74fe80d12743674064a2d2f2edff39ac7751511817f0e7d41e3
AUX phc-intel-0.3.2.12.1-2.6.36.patch 15957 RMD160 5ec9633d3447df20b4b1838ebc83d558b0a5d18d SHA1 86ff3e3afff68f76e2c96948fb54bda86dd09404 SHA256 93ca6bb4c63ed5ac88f33b94d543091ce3b17a425967682d9431ea3b85bff632
AUX phc-intel-0.3.2.12.1-2.6.37.patch 15929 RMD160 f8e2ab5eb56d39ba092acbcb20f39d2e93c1bc4d SHA1 7bbdd951f7cbc5d7de5bbb67e87bcc5cf1778d9a SHA256 e4e7ec00fa422bc429e4280b8f2d900e4c9b45293be305a720d70c23492130fa
+AUX phc-intel-0.3.2.12.1-2.6.38.patch 15929 RMD160 f8e2ab5eb56d39ba092acbcb20f39d2e93c1bc4d SHA1 7bbdd951f7cbc5d7de5bbb67e87bcc5cf1778d9a SHA256 e4e7ec00fa422bc429e4280b8f2d900e4c9b45293be305a720d70c23492130fa
DIST phc-intel-0.3.199.3_pre.tar.bz2 15508 RMD160 0348c0776f11beda14befbdfaf2f246516e68558 SHA1 b51c7d6123c1a45dcf7cd54273ce642ef8f7895a SHA256 4441af7a0a1335a920b0d18a46483a64fbae8e57d98a6bdbf31dbacac2bbdf82
DIST phc-intel-0.3.2.10.tar.bz2 20680 RMD160 c9af322d7234c83aef348eb1b01cccf1f5cb1b18 SHA1 3e8b3e2f5732ace6e76146bd820448fd17369c31 SHA256 8483e071ad2644c339539ac5298c7a31a12212fd9a68baa1f6766dad146510f5
DIST phc-intel-0.3.2.12.1.tar.bz2 14412 RMD160 d8a8ca003f0af2d1f8e7a59ab8739a51afceafd3 SHA1 d5c991376f7ce7f3b7afa6fc7618b4ba602bf457 SHA256 4f66989d424d328b205873da1b0363e75f27d7912e0e93c1cad3407c17be8264
EBUILD phc-intel-0.3.199.3_pre.ebuild 1201 RMD160 bcace92a9dac5f7fcb9a18a3d9d2a196cc3c00da SHA1 787d5420553c6c6c979a9e0b8eb39a229679150a SHA256 cf022fadc97cd3b56ed3888b9f645d8943447a741627b2d80e19cb315147a1c0
EBUILD phc-intel-0.3.2.10.ebuild 1079 RMD160 aff8b2924d4878da10ec374d9c8c179a3c1d6d23 SHA1 5c445495287110484664ce0312d539e8f170ec21 SHA256 19ed93eab1feeb9cd3aa214ba76ff5834cff06cb821676842574e6075f8a92c4
-EBUILD phc-intel-0.3.2.12.1-r2.ebuild 1620 RMD160 228b1b09e9d79bee7979ab17457b42d9d61a1e09 SHA1 3f16607ba7d045affdb29b019f2703aa9e4bc05c SHA256 a9774feb8aeadde5db0217214ceef25193e7a2664ec6b6da98ddc948a330de16
-MISC ChangeLog 746 RMD160 bcb7e914ea4ceba5f747004e5a801e4a0672bb5d SHA1 a942090b688d22f28254a59251d4103b1c91b43b SHA256 56e4eee4b913c614a47f0e8eff87a70ac40fba493d6757525a0c8d790902d53d
+EBUILD phc-intel-0.3.2.12.1-r2.ebuild 1643 RMD160 d5e3821b4f10e766a0f1b5fe530441c8b2de9617 SHA1 1ef836abb4d8dbbf8bda8f8ec1ed5a65aede17c4 SHA256 b2d29ec92c73ae2faa8226ad83be372a760a0eec6e564d6753907a74d1b037c5
+MISC ChangeLog 903 RMD160 562212695d0380027b399792f81d03a56931524b SHA1 18fd265c2c32c09d1facd73bb5cebe28f70f9ee4 SHA256 6a2bbe4d5b9b959f361f78397b3a52cf8612793d1e011a8c1e0e3d2323272492
MISC metadata.xml 244 RMD160 ba31bc851ce5d8e007b223b4f799d84d4c6699d0 SHA1 2192e855054fb7016488afba3eda6d938fdf925d SHA256 1022f65be1952b5197408dfbf61543b61557601ce3a9f15acabeb3e9d84a0fbe
diff --git a/sys-power/phc-intel/files/phc-intel-0.3.2.12.1-2.6.38.patch b/sys-power/phc-intel/files/phc-intel-0.3.2.12.1-2.6.38.patch
new file mode 100644
index 000000000000..f5dd4f49b75f
--- /dev/null
+++ b/sys-power/phc-intel/files/phc-intel-0.3.2.12.1-2.6.38.patch
@@ -0,0 +1,528 @@
+--- linux-2.6.37-gentoo/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
++++ phc-intel-0.3.2-12-1/inc/2.6.37/acpi-cpufreq.c
+@@ -25,6 +25,10 @@
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
++/* This file has been patched with Linux PHC: www.linux-phc.org
++* Patch version: linux-phc-0.3.2
++*/
++
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
+@@ -61,12 +65,17 @@
+ };
+
+ #define INTEL_MSR_RANGE (0xffff)
++#define INTEL_MSR_VID_MASK (0x00ff)
++#define INTEL_MSR_FID_MASK (0xff00)
++#define INTEL_MSR_FID_SHIFT (0x8)
++#define PHC_VERSION_STRING "0.3.2:2"
+
+ struct acpi_cpufreq_data {
+ struct acpi_processor_performance *acpi_data;
+ struct cpufreq_frequency_table *freq_table;
+ unsigned int resume;
+ unsigned int cpu_feature;
++ acpi_integer *original_controls;
+ };
+
+ static DEFINE_PER_CPU(struct acpi_cpufreq_data *, acfreq_data);
+@@ -102,13 +111,14 @@
+ static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data)
+ {
+ int i;
++ u32 fid;
+ struct acpi_processor_performance *perf;
+
+- msr &= INTEL_MSR_RANGE;
++ fid = msr & INTEL_MSR_FID_MASK;
+ perf = data->acpi_data;
+
+ for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
+- if (msr == perf->states[data->freq_table[i].index].status)
++ if (fid == (perf->states[data->freq_table[i].index].status & INTEL_MSR_FID_MASK))
+ return data->freq_table[i].frequency;
+ }
+ return data->freq_table[0].frequency;
+@@ -701,6 +711,8 @@
+ per_cpu(acfreq_data, policy->cpu) = NULL;
+ acpi_processor_unregister_performance(data->acpi_data,
+ policy->cpu);
++ if (data->original_controls)
++ kfree(data->original_controls);
+ kfree(data->freq_table);
+ kfree(data);
+ }
+@@ -719,8 +731,470 @@
+ return 0;
+ }
+
++/* sysfs interface to change operating points voltages */
++
++static unsigned int extract_fid_from_control(unsigned int control)
++{
++ return ((control & INTEL_MSR_FID_MASK) >> INTEL_MSR_FID_SHIFT);
++}
++
++static unsigned int extract_vid_from_control(unsigned int control)
++{
++ return (control & INTEL_MSR_VID_MASK);
++}
++
++
++static bool check_cpu_control_capability(struct acpi_cpufreq_data *data) {
++ /* check if the cpu we are running on is capable of setting new control data
++ *
++ */
++ if (unlikely(data == NULL ||
++ data->acpi_data == NULL ||
++ data->freq_table == NULL ||
++ data->cpu_feature != SYSTEM_INTEL_MSR_CAPABLE)) {
++ return false;
++ } else {
++ return true;
++ };
++}
++
++
++static ssize_t check_origial_table (struct acpi_cpufreq_data *data)
++{
++
++ struct acpi_processor_performance *acpi_data;
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int state_index;
++
++ acpi_data = data->acpi_data;
++ freq_table = data->freq_table;
++
++ if (data->original_controls == NULL) {
++ // Backup original control values
++ data->original_controls = kcalloc(acpi_data->state_count,
++ sizeof(acpi_integer), GFP_KERNEL);
++ if (data->original_controls == NULL) {
++ printk("failed to allocate memory for original control values\n");
++ return -ENOMEM;
++ }
++ for (state_index = 0; state_index < acpi_data->state_count; state_index++) {
++ data->original_controls[state_index] = acpi_data->states[state_index].control;
++ }
++ }
++ return 0;
++}
++
++static ssize_t show_freq_attr_vids(struct cpufreq_policy *policy, char *buf)
++ /* display phc's voltage id's
++ *
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct acpi_processor_performance *acpi_data;
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int i;
++ unsigned int vid;
++ ssize_t count = 0;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
++
++ acpi_data = data->acpi_data;
++ freq_table = data->freq_table;
++
++ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
++ vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
++ count += sprintf(&buf[count], "%u ", vid);
++ }
++ count += sprintf(&buf[count], "\n");
++
++ return count;
++}
++
++static ssize_t show_freq_attr_default_vids(struct cpufreq_policy *policy, char *buf)
++ /* display acpi's default voltage id's
++ *
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int i;
++ unsigned int vid;
++ ssize_t count = 0;
++ ssize_t retval;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
++
++ retval = check_origial_table(data);
++ if (0 != retval)
++ return retval;
++
++ freq_table = data->freq_table;
++
++ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
++ vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
++ count += sprintf(&buf[count], "%u ", vid);
++ }
++ count += sprintf(&buf[count], "\n");
++
++ return count;
++}
++
++static ssize_t show_freq_attr_fids(struct cpufreq_policy *policy, char *buf)
++ /* display phc's frequeny id's
++ *
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct acpi_processor_performance *acpi_data;
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int i;
++ unsigned int fid;
++ ssize_t count = 0;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
++
++ acpi_data = data->acpi_data;
++ freq_table = data->freq_table;
++
++ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
++ fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
++ count += sprintf(&buf[count], "%u ", fid);
++ }
++ count += sprintf(&buf[count], "\n");
++
++ return count;
++}
++
++static ssize_t show_freq_attr_controls(struct cpufreq_policy *policy, char *buf)
++ /* display phc's controls for the cpu (frequency id's and related voltage id's)
++ *
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct acpi_processor_performance *acpi_data;
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int i;
++ unsigned int fid;
++ unsigned int vid;
++ ssize_t count = 0;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
++
++ acpi_data = data->acpi_data;
++ freq_table = data->freq_table;
++
++ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
++ fid = extract_fid_from_control(acpi_data->states[freq_table[i].index].control);
++ vid = extract_vid_from_control(acpi_data->states[freq_table[i].index].control);
++ count += sprintf(&buf[count], "%u:%u ", fid, vid);
++ }
++ count += sprintf(&buf[count], "\n");
++
++ return count;
++}
++
++static ssize_t show_freq_attr_default_controls(struct cpufreq_policy *policy, char *buf)
++ /* display acpi's default controls for the cpu (frequency id's and related voltage id's)
++ *
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int i;
++ unsigned int fid;
++ unsigned int vid;
++ ssize_t count = 0;
++ ssize_t retval;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
++
++ retval = check_origial_table(data);
++ if (0 != retval)
++ return retval;
++
++ freq_table = data->freq_table;
++
++ for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
++ fid = extract_fid_from_control(data->original_controls[freq_table[i].index]);
++ vid = extract_vid_from_control(data->original_controls[freq_table[i].index]);
++ count += sprintf(&buf[count], "%u:%u ", fid, vid);
++ }
++ count += sprintf(&buf[count], "\n");
++
++ return count;
++}
++
++
++static ssize_t store_freq_attr_vids(struct cpufreq_policy *policy, const char *buf, size_t count)
++ /* store the voltage id's for the related frequency
++ * We are going to do some sanity checks here to prevent users
++ * from setting higher voltages than the default one.
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct acpi_processor_performance *acpi_data;
++ struct cpufreq_frequency_table *freq_table;
++ unsigned int freq_index;
++ unsigned int state_index;
++ unsigned int new_vid;
++ unsigned int original_vid;
++ unsigned int new_control;
++ unsigned int original_control;
++ const char *curr_buf = buf;
++ char *next_buf;
++ ssize_t retval;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV; //check if CPU is capable of changing controls
++
++ retval = check_origial_table(data);
++ if (0 != retval)
++ return retval;
++
++ acpi_data = data->acpi_data;
++ freq_table = data->freq_table;
++
++ /* for each value taken from the sysfs interfalce (phc_vids) get entrys and convert them to unsigned long integers*/
++ for (freq_index = 0; freq_table[freq_index].frequency != CPUFREQ_TABLE_END; freq_index++) {
++ new_vid = simple_strtoul(curr_buf, &next_buf, 10);
++ if (next_buf == curr_buf) {
++ if ((curr_buf - buf == count - 1) && (*curr_buf == '\n')) { //end of line?
++ curr_buf++;
++ break;
++ }
++ //if we didn't got end of line but there is nothing more to read something went wrong...
++ printk("failed to parse vid value at %i (%s)\n", freq_index, curr_buf);
++ return -EINVAL;
++ }
++
++ state_index = freq_table[freq_index].index;
++ original_control = data->original_controls[state_index];
++ original_vid = original_control & INTEL_MSR_VID_MASK;
++
++ /* before we store the values we do some checks to prevent
++ * users to set up values higher than the default one
++ */
++ if (new_vid <= original_vid) {
++ new_control = (original_control & ~INTEL_MSR_VID_MASK) | new_vid;
++ dprintk("setting control at %i to %x (default is %x)\n",
++ freq_index, new_control, original_control);
++ acpi_data->states[state_index].control = new_control;
++
++ } else {
++ printk("skipping vid at %i, %u is greater than default %u\n",
++ freq_index, new_vid, original_vid);
++ }
++
++ curr_buf = next_buf;
++ /* jump over value seperators (space or comma).
++ * There could be more than one space or comma character
++ * to separate two values so we better do it using a loop.
++ */
++ while ((curr_buf - buf < count) && ((*curr_buf == ' ') || (*curr_buf == ','))) {
++ curr_buf++;
++ }
++ }
++
++ /* set new voltage for current frequency */
++ data->resume = 1;
++ acpi_cpufreq_target(policy, get_cur_freq_on_cpu(policy->cpu), CPUFREQ_RELATION_L);
++
++ return curr_buf - buf;
++}
++
++static ssize_t store_freq_attr_controls(struct cpufreq_policy *policy, const char *buf, size_t count)
++ /* store the controls (frequency id's and related voltage id's)
++ * We are going to do some sanity checks here to prevent users
++ * from setting higher voltages than the default one.
++ */
++{
++ struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
++ struct acpi_processor_performance *acpi_data;
++ struct cpufreq_frequency_table *freq_table;
++ const char *curr_buf;
++ unsigned int op_count;
++ unsigned int state_index;
++ int isok;
++ char *next_buf;
++ ssize_t retval;
++ unsigned int new_vid;
++ unsigned int original_vid;
++ unsigned int new_fid;
++ unsigned int old_fid;
++ unsigned int original_control;
++ unsigned int old_control;
++ unsigned int new_control;
++ int found;
++
++ if (!check_cpu_control_capability(data)) return -ENODEV;
++
++ retval = check_origial_table(data);
++ if (0 != retval)
++ return retval;
++
++ acpi_data = data->acpi_data;
++ freq_table = data->freq_table;
++
++ op_count = 0;
++ curr_buf = buf;
++ next_buf = NULL;
++ isok = 1;
++
++ while ( (isok) && (curr_buf != NULL) )
++ {
++ op_count++;
++ // Parse fid
++ new_fid = simple_strtoul(curr_buf, &next_buf, 10);
++ if ((next_buf != curr_buf) && (next_buf != NULL))
++ {
++ // Parse separator between frequency and voltage
++ curr_buf = next_buf;
++ next_buf = NULL;
++ if (*curr_buf==':')
++ {
++ curr_buf++;
++ // Parse vid
++ new_vid = simple_strtoul(curr_buf, &next_buf, 10);
++ if ((next_buf != curr_buf) && (next_buf != NULL))
++ {
++ found = 0;
++ for (state_index = 0; state_index < acpi_data->state_count; state_index++) {
++ old_control = acpi_data->states[state_index].control;
++ old_fid = extract_fid_from_control(old_control);
++ if (new_fid == old_fid)
++ {
++ found = 1;
++ original_control = data->original_controls[state_index];
++ original_vid = extract_vid_from_control(original_control);
++ if (new_vid <= original_vid)
++ {
++ new_control = (original_control & ~INTEL_MSR_VID_MASK) | new_vid;
++ dprintk("setting control at %i to %x (default is %x)\n",
++ state_index, new_control, original_control);
++ acpi_data->states[state_index].control = new_control;
++
++ } else {
++ printk("skipping vid at %i, %u is greater than default %u\n",
++ state_index, new_vid, original_vid);
++ }
++ }
++ }
++
++ if (found == 0)
++ {
++ printk("operating point # %u not found (FID = %u)\n", op_count, new_fid);
++ isok = 0;
++ }
++
++ // Parse seprator before next operating point, if any
++ curr_buf = next_buf;
++ next_buf = NULL;
++ if ((*curr_buf == ',') || (*curr_buf == ' '))
++ curr_buf++;
++ else
++ curr_buf = NULL;
++ }
++ else
++ {
++ printk("failed to parse VID of operating point # %u (%s)\n", op_count, curr_buf);
++ isok = 0;
++ }
++ }
++ else
++ {
++ printk("failed to parse operating point # %u (%s)\n", op_count, curr_buf);
++ isok = 0;
++ }
++ }
++ else
++ {
++ printk("failed to parse FID of operating point # %u (%s)\n", op_count, curr_buf);
++ isok = 0;
++ }
++ }
++
++ if (isok)
++ {
++ retval = count;
++ /* set new voltage at current frequency */
++ data->resume = 1;
++ acpi_cpufreq_target(policy, get_cur_freq_on_cpu(policy->cpu), CPUFREQ_RELATION_L);
++ }
++ else
++ {
++ retval = -EINVAL;
++ }
++
++ return retval;
++}
++
++static ssize_t show_freq_attr_phc_version(struct cpufreq_policy *policy, char *buf)
++ /* print out the phc version string set at the beginning of that file
++ */
++{
++ ssize_t count = 0;
++ count += sprintf(&buf[count], "%s\n", PHC_VERSION_STRING);
++ return count;
++}
++
++
++
++static struct freq_attr cpufreq_freq_attr_phc_version =
++{
++ /*display phc's version string*/
++ .attr = { .name = "phc_version", .mode = 0444 },
++ .show = show_freq_attr_phc_version,
++ .store = NULL,
++};
++
++static struct freq_attr cpufreq_freq_attr_vids =
++{
++ /*display phc's voltage id's for the cpu*/
++ .attr = { .name = "phc_vids", .mode = 0644 },
++ .show = show_freq_attr_vids,
++ .store = store_freq_attr_vids,
++};
++
++static struct freq_attr cpufreq_freq_attr_default_vids =
++{
++ /*display acpi's default frequency id's for the cpu*/
++ .attr = { .name = "phc_default_vids", .mode = 0444 },
++ .show = show_freq_attr_default_vids,
++ .store = NULL,
++};
++
++static struct freq_attr cpufreq_freq_attr_fids =
++{
++ /*display phc's default frequency id's for the cpu*/
++ .attr = { .name = "phc_fids", .mode = 0444 },
++ .show = show_freq_attr_fids,
++ .store = NULL,
++};
++
++static struct freq_attr cpufreq_freq_attr_controls =
++{
++ /*display phc's current voltage/frequency controls for the cpu*/
++ .attr = { .name = "phc_controls", .mode = 0644 },
++ .show = show_freq_attr_controls,
++ .store = store_freq_attr_controls,
++};
++
++static struct freq_attr cpufreq_freq_attr_default_controls =
++{
++ /*display acpi's default voltage/frequency controls for the cpu*/
++ .attr = { .name = "phc_default_controls", .mode = 0444 },
++ .show = show_freq_attr_default_controls,
++ .store = NULL,
++};
++
++
+ static struct freq_attr *acpi_cpufreq_attr[] = {
+ &cpufreq_freq_attr_scaling_available_freqs,
++ &cpufreq_freq_attr_phc_version,
++ &cpufreq_freq_attr_vids,
++ &cpufreq_freq_attr_default_vids,
++ &cpufreq_freq_attr_fids,
++ &cpufreq_freq_attr_controls,
++ &cpufreq_freq_attr_default_controls,
+ NULL,
+ };
+
diff --git a/sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild b/sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild
index b50a8f5eeccf..3b0f02d42349 100644
--- a/sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild
+++ b/sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild,v 1.2 2011/01/05 19:19:13 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/phc-intel/phc-intel-0.3.2.12.1-r2.ebuild,v 1.3 2011/03/16 23:19:43 xmw Exp $
EAPI=2
@@ -35,7 +35,7 @@ pkg_setup() {
src_prepare() {
local my_k="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
- if kernel_is eq 2 6 35 || kernel_is eq 2 6 36 || kernel_is eq 2 6 37 ; then
+ if kernel_is eq 2 6 35 || kernel_is eq 2 6 36 || kernel_is eq 2 6 37 || kernel_is eq 2 6 38 ; then
cp "${KERNEL_DIR}"/arch/x86/kernel/cpu/cpufreq/mperf.h . || die
mkdir inc/${my_k} || die
cp "${FILESDIR}"/${P}-${my_k}.patch \