rpms/kernel/devel disable-p4-cpufreq-ui.patch, NONE, 1.1 config-x86-generic, 1.51, 1.52 config-x86_64-generic, 1.49, 1.50 kernel.spec, 1.1113, 1.1114
Matthew Garrett
mjg59 at fedoraproject.org
Mon Nov 3 17:28:34 UTC 2008
Author: mjg59
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10409
Modified Files:
config-x86-generic config-x86_64-generic kernel.spec
Added Files:
disable-p4-cpufreq-ui.patch
Log Message:
- disable-p4-cpufreq-ui.patch
* Remove the UI from the p4-clockmod code, but allow it to be used in-kernel
disable-p4-cpufreq-ui.patch:
--- NEW FILE disable-p4-cpufreq-ui.patch ---
diff -ur linux-2.6.27.noarch/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c linux-2.6.27.noarch.p4/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
--- linux-2.6.27.noarch/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c 2008-11-03 17:14:03.000000000 +0000
+++ linux-2.6.27.noarch.p4/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c 2008-11-03 17:18:38.000000000 +0000
@@ -274,6 +274,7 @@
.name = "p4-clockmod",
.owner = THIS_MODULE,
.attr = p4clockmod_attr,
+ .hide_interface = TRUE,
};
diff -ur linux-2.6.27.noarch/drivers/cpufreq/cpufreq.c linux-2.6.27.noarch.p4/drivers/cpufreq/cpufreq.c
--- linux-2.6.27.noarch/drivers/cpufreq/cpufreq.c 2008-11-03 17:14:03.000000000 +0000
+++ linux-2.6.27.noarch.p4/drivers/cpufreq/cpufreq.c 2008-11-03 17:18:38.000000000 +0000
@@ -754,6 +754,11 @@
.release = cpufreq_sysfs_release,
};
+static struct kobj_type ktype_empty_cpufreq = {
+ .sysfs_ops = &sysfs_ops,
+ .release = cpufreq_sysfs_release,
+};
+
/**
* cpufreq_add_dev - add a CPU device
@@ -876,26 +881,36 @@
memcpy(&new_policy, policy, sizeof(struct cpufreq_policy));
/* prepare interface data */
- ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq, &sys_dev->kobj,
- "cpufreq");
- if (ret)
- goto err_out_driver_exit;
-
- /* set up files for this cpu device */
- drv_attr = cpufreq_driver->attr;
- while ((drv_attr) && (*drv_attr)) {
- ret = sysfs_create_file(&policy->kobj, &((*drv_attr)->attr));
+ if (!cpufreq_driver->hide_interface) {
+ ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq,
+ &sys_dev->kobj, "cpufreq");
if (ret)
goto err_out_driver_exit;
- drv_attr++;
- }
- if (cpufreq_driver->get) {
- ret = sysfs_create_file(&policy->kobj, &cpuinfo_cur_freq.attr);
- if (ret)
- goto err_out_driver_exit;
- }
- if (cpufreq_driver->target) {
- ret = sysfs_create_file(&policy->kobj, &scaling_cur_freq.attr);
+
+ /* set up files for this cpu device */
+ drv_attr = cpufreq_driver->attr;
+ while ((drv_attr) && (*drv_attr)) {
+ ret = sysfs_create_file(&policy->kobj,
+ &((*drv_attr)->attr));
+ if (ret)
+ goto err_out_driver_exit;
+ drv_attr++;
+ }
+ if (cpufreq_driver->get) {
+ ret = sysfs_create_file(&policy->kobj,
+ &cpuinfo_cur_freq.attr);
+ if (ret)
+ goto err_out_driver_exit;
+ }
+ if (cpufreq_driver->target) {
+ ret = sysfs_create_file(&policy->kobj,
+ &scaling_cur_freq.attr);
+ if (ret)
+ goto err_out_driver_exit;
+ }
+ } else {
+ ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq_empty,
+ &sys_dev->kobj, "cpufreq");
if (ret)
goto err_out_driver_exit;
}
diff -ur linux-2.6.27.noarch/include/linux/cpufreq.h linux-2.6.27.noarch.p4/include/linux/cpufreq.h
--- linux-2.6.27.noarch/include/linux/cpufreq.h 2008-11-03 17:14:03.000000000 +0000
+++ linux-2.6.27.noarch.p4/include/linux/cpufreq.h 2008-11-03 17:18:38.000000000 +0000
@@ -234,6 +234,7 @@
int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg);
int (*resume) (struct cpufreq_policy *policy);
struct freq_attr **attr;
+ bool hide_interface;
};
/* flags */
Index: config-x86-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86-generic,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- config-x86-generic 27 Oct 2008 17:12:32 -0000 1.51
+++ config-x86-generic 3 Nov 2008 17:28:03 -0000 1.52
@@ -187,7 +187,7 @@
CONFIG_X86_SPEEDSTEP_SMI=y
CONFIG_X86_SPEEDSTEP_LIB=y
# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-# CONFIG_X86_P4_CLOCKMOD is not set
+CONFIG_X86_P4_CLOCKMOD=m
CONFIG_X86_LONGRUN=y
# CONFIG_X86_LONGHAUL is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86_64-generic,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- config-x86_64-generic 30 Oct 2008 02:23:18 -0000 1.49
+++ config-x86_64-generic 3 Nov 2008 17:28:03 -0000 1.50
@@ -14,7 +14,7 @@
CONFIG_NR_CPUS=64
CONFIG_X86_POWERNOW_K8=m
CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_P4_CLOCKMOD is not set
+CONFIG_X86_P4_CLOCKMOD=m
CONFIG_IA32_EMULATION=y
# CONFIG_IA32_AOUT is not set
# CONFIG_IOMMU_DEBUG is not set
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1113
retrieving revision 1.1114
diff -u -r1.1113 -r1.1114
--- kernel.spec 3 Nov 2008 16:56:00 -0000 1.1113
+++ kernel.spec 3 Nov 2008 17:28:03 -0000 1.1114
@@ -738,6 +738,10 @@
# SELinux: Fix handling of empty tty_files. 37dd0bd04a3240d2922786d501e2f12cec858fbf BZ469079
Patch3120: linux-2.6-selinux-empty-tty-files.patch
+# Provide P4 clock modulation in-kernel for thermal reasons, but don't expose
+# ui
+Patch3130: disable-p4-cpufreq-ui.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1339,6 +1343,8 @@
# SELinux on ppc64 without plymouth can't boot
ApplyPatch linux-2.6-selinux-empty-tty-files.patch
+ApplyPatch disable-p4-cpufreq-ui.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -1922,6 +1928,8 @@
- linux-2.6-defaults-pciehp.patch
* Enable passive mode by default
- Build acpiphp in statically
+- disable-p4-cpufreq-ui.patch
+ * Remove the UI from the p4-clockmod code, but allow it to be used in-kernel
* Mon Nov 03 2008 Dave Airlie <airlied at redhat.com> 2.6.27.4-73
- drm-modesetting-radeon.patch: fix modeset reporting for pm-utils
More information about the fedora-extras-commits
mailing list