All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
@ 2013-07-11 22:15 Srivatsa S. Bhat
  2013-07-11 22:15 ` [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume Srivatsa S. Bhat
                   ` (11 more replies)
  0 siblings, 12 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:15 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel


Hi,

Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
some subtle regressions in the cpufreq subsystem during suspend/resume.
This patchset is aimed at rectifying those problems, by fixing the regression
as well as achieving the original goal of that commit in a proper way.

Patch 1 reverts the above commit, and is CC'ed to stable.

Patches 2 - 5 reorganize the code and have no functional impact, and can go
in as general cleanups as well. This reorganization builds a base that the
rest of the patches will make use of.

Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
across suspend/resume.

All the patches apply on current mainline.


Robert, Durgadoss, it would be great if you could try it out and see if it works
well for your usecase. I tested it locally and cpufreq related files did retain
their permissions across suspend/resume. Let me know if it works fine in your
setup too.

And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
whether their systems work fine after:
a. applying only the first commit (this is what gets backported to stable)
b. applying all the commits

(Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
testing this patchset. Though that patch also touches cpufreq subsystem, it
doesn't affect this patchset in any way and there is absolutely no dependency
between the two in terms of code. That fix just makes basic CPU hotplug work
without locking up on current mainline).

[1]. https://lkml.org/lkml/2013/7/10/611


Thank you very much!


 Srivatsa S. Bhat (8):
      cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume
      cpufreq: Fix misplaced call to cpufreq_update_policy()
      cpufreq: Add helper to perform alloc/free of policy structure
      cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface
      cpufreq: Extract the handover of policy cpu to a helper function
      cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown
      cpufreq: Preserve policy structure across suspend/resume
      cpufreq: Perform light-weight init/teardown during suspend/resume

 drivers/cpufreq/cpufreq.c       |  297 ++++++++++++++++++++++++++-------------
 drivers/cpufreq/cpufreq_stats.c |   10 -
 2 files changed, 199 insertions(+), 108 deletions(-)


Thanks,
Srivatsa S. Bhat
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
@ 2013-07-11 22:15 ` Srivatsa S. Bhat
  2013-07-12  7:18   ` Viresh Kumar
  2013-07-11 22:15 ` [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy() Srivatsa S. Bhat
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:15 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) has
unfortunately caused several things in the cpufreq subsystem to break subtly
after a suspend/resume cycle.

The intention of that patch was to retain the file permissions of the
cpufreq related sysfs files across suspend/resume. To achieve that, the commit
completely removed the calls to cpufreq_add_dev() and __cpufreq_remove_dev()
during suspend/resume transitions. But the problem is that those functions
do 2 kinds of things:
  1. Low-level initialization/tear-down that are critical to the correct
     functioning of cpufreq-core.
  2. Kobject and sysfs related initialization/teardown.

Ideally we should have reorganized the code to cleanly separate these two
responsibilities, and skipped only the sysfs related parts during
suspend/resume. Since we skipped the entire callbacks instead (which also
included some CPU and cpufreq-specific critical components), cpufreq
subsystem started behaving erratically after suspend/resume.

So revert the commit to fix the regression. We'll revisit and address the
original goal of that commit separately, since it involves quite a bit of
careful code reorganization and appears to be non-trivial.

(While reverting the commit, note that another commit f51e1eb "cpufreq:
Fix cpufreq regression after suspend/resume" already reverted part of the
original set of changes. So revert only the remaining ones).

Cc: stable@vger.kernel.org
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c       |    4 +++-
 drivers/cpufreq/cpufreq_stats.c |    6 ++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6a015ad..ccc6eab 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1941,13 +1941,15 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
 	if (dev) {
 		switch (action) {
 		case CPU_ONLINE:
+		case CPU_ONLINE_FROZEN:
 			cpufreq_add_dev(dev, NULL);
 			break;
 		case CPU_DOWN_PREPARE:
-		case CPU_UP_CANCELED_FROZEN:
+		case CPU_DOWN_PREPARE_FROZEN:
 			__cpufreq_remove_dev(dev, NULL);
 			break;
 		case CPU_DOWN_FAILED:
+		case CPU_DOWN_FAILED_FROZEN:
 			cpufreq_add_dev(dev, NULL);
 			break;
 		}
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index cd9e817..12225d1 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -353,13 +353,11 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
 		cpufreq_update_policy(cpu);
 		break;
 	case CPU_DOWN_PREPARE:
+	case CPU_DOWN_PREPARE_FROZEN:
 		cpufreq_stats_free_sysfs(cpu);
 		break;
 	case CPU_DEAD:
-		cpufreq_stats_free_table(cpu);
-		break;
-	case CPU_UP_CANCELED_FROZEN:
-		cpufreq_stats_free_sysfs(cpu);
+	case CPU_DEAD_FROZEN:
 		cpufreq_stats_free_table(cpu);
 		break;
 	}


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy()
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
  2013-07-11 22:15 ` [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume Srivatsa S. Bhat
@ 2013-07-11 22:15 ` Srivatsa S. Bhat
  2013-07-12  7:06   ` Viresh Kumar
  2013-07-11 22:16 ` [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure Srivatsa S. Bhat
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:15 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

The call to cpufreq_update_policy() is placed in the CPU hotplug callback
of cpufreq_stats, which has a higher priority than the CPU hotplug callback
of cpufreq-core. As a result, during CPU_ONLINE/CPU_ONLINE_FROZEN, we end up
calling cpufreq_update_policy() *before* calling cpufreq_add_dev() !
And for uninitialized CPUs, it just returns silently, not doing anything.

To add to it, cpufreq_stats is not even the right place to call
cpufreq_update_policy() to begin with. The cpufreq core ought to handle
this in its own callback, from an elegance/relevance perspective.

So move the invocation of cpufreq_update_policy() to cpufreq_cpu_callback,
and place it *after* cpufreq_add_dev().

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c       |    1 +
 drivers/cpufreq/cpufreq_stats.c |    6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index ccc6eab..f8c3100 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1943,6 +1943,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
 		case CPU_ONLINE:
 		case CPU_ONLINE_FROZEN:
 			cpufreq_add_dev(dev, NULL);
+			cpufreq_update_policy(cpu);
 			break;
 		case CPU_DOWN_PREPARE:
 		case CPU_DOWN_PREPARE_FROZEN:
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 12225d1..a3e7475 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -348,10 +348,6 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
 	unsigned int cpu = (unsigned long)hcpu;
 
 	switch (action) {
-	case CPU_ONLINE:
-	case CPU_ONLINE_FROZEN:
-		cpufreq_update_policy(cpu);
-		break;
 	case CPU_DOWN_PREPARE:
 	case CPU_DOWN_PREPARE_FROZEN:
 		cpufreq_stats_free_sysfs(cpu);
@@ -390,8 +386,6 @@ static int __init cpufreq_stats_init(void)
 		return ret;
 
 	register_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
-	for_each_online_cpu(cpu)
-		cpufreq_update_policy(cpu);
 
 	ret = cpufreq_register_notifier(&notifier_trans_block,
 				CPUFREQ_TRANSITION_NOTIFIER);


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
  2013-07-11 22:15 ` [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume Srivatsa S. Bhat
  2013-07-11 22:15 ` [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy() Srivatsa S. Bhat
@ 2013-07-11 22:16 ` Srivatsa S. Bhat
  2013-07-12  7:09   ` Viresh Kumar
  2013-07-11 22:16 ` [PATCH 4/8] cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface Srivatsa S. Bhat
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:16 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

Separate out the allocation of the cpufreq policy structure (along with
its error handling) to a helper function. This makes the code easier to
read and also helps with some upcoming code reorganization.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c |   50 ++++++++++++++++++++++++++++++++-------------
 1 file changed, 35 insertions(+), 15 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index f8c3100..ca14dc2 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -943,6 +943,37 @@ static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling,
 }
 #endif
 
+static struct cpufreq_policy *cpufreq_policy_alloc(void)
+{
+	struct cpufreq_policy *policy;
+
+	policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL);
+	if (!policy)
+		return NULL;
+
+	if (!alloc_cpumask_var(&policy->cpus, GFP_KERNEL))
+		goto err_free_policy;
+
+	if (!zalloc_cpumask_var(&policy->related_cpus, GFP_KERNEL))
+		goto err_free_cpumask;
+
+	return policy;
+
+err_free_cpumask:
+	free_cpumask_var(policy->cpus);
+err_free_policy:
+	kfree(policy);
+
+	return NULL;
+}
+
+static void cpufreq_policy_free(struct cpufreq_policy *policy)
+{
+	free_cpumask_var(policy->related_cpus);
+	free_cpumask_var(policy->cpus);
+	kfree(policy);
+}
+
 /**
  * cpufreq_add_dev - add a CPU device
  *
@@ -996,16 +1027,10 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 		goto module_out;
 	}
 
-	policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL);
+	policy = cpufreq_policy_alloc();
 	if (!policy)
 		goto nomem_out;
 
-	if (!alloc_cpumask_var(&policy->cpus, GFP_KERNEL))
-		goto err_free_policy;
-
-	if (!zalloc_cpumask_var(&policy->related_cpus, GFP_KERNEL))
-		goto err_free_cpumask;
-
 	policy->cpu = cpu;
 	policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
 	cpumask_copy(policy->cpus, cpumask_of(cpu));
@@ -1070,11 +1095,7 @@ err_out_unregister:
 
 err_set_policy_cpu:
 	per_cpu(cpufreq_policy_cpu, cpu) = -1;
-	free_cpumask_var(policy->related_cpus);
-err_free_cpumask:
-	free_cpumask_var(policy->cpus);
-err_free_policy:
-	kfree(policy);
+	cpufreq_policy_free(policy);
 nomem_out:
 	module_put(cpufreq_driver->owner);
 module_out:
@@ -1201,9 +1222,8 @@ static int __cpufreq_remove_dev(struct device *dev,
 		if (cpufreq_driver->exit)
 			cpufreq_driver->exit(data);
 
-		free_cpumask_var(data->related_cpus);
-		free_cpumask_var(data->cpus);
-		kfree(data);
+		cpufreq_policy_free(data);
+
 	} else if (cpufreq_driver->target) {
 		__cpufreq_governor(data, CPUFREQ_GOV_START);
 		__cpufreq_governor(data, CPUFREQ_GOV_LIMITS);


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 4/8] cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (2 preceding siblings ...)
  2013-07-11 22:16 ` [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure Srivatsa S. Bhat
@ 2013-07-11 22:16 ` Srivatsa S. Bhat
  2013-07-12  7:17   ` Viresh Kumar
  2013-07-11 22:16 ` [PATCH 5/8] cpufreq: Extract the handover of policy cpu to a helper function Srivatsa S. Bhat
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:16 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

cpufreq_add_dev_interface() includes the work of exposing the interface
to the device, as well as a lot of unrelated stuff. Move the latter to
cpufreq_add_dev(), where it is more appropriate.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c |   43 ++++++++++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 17 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index ca14dc2..2ab39f3 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -834,11 +834,8 @@ static int cpufreq_add_dev_interface(unsigned int cpu,
 				     struct cpufreq_policy *policy,
 				     struct device *dev)
 {
-	struct cpufreq_policy new_policy;
 	struct freq_attr **drv_attr;
-	unsigned long flags;
 	int ret = 0;
-	unsigned int j;
 
 	/* prepare interface data */
 	ret = kobject_init_and_add(&policy->kobj, &ktype_cpufreq,
@@ -870,17 +867,23 @@ static int cpufreq_add_dev_interface(unsigned int cpu,
 			goto err_out_kobj_put;
 	}
 
-	write_lock_irqsave(&cpufreq_driver_lock, flags);
-	for_each_cpu(j, policy->cpus) {
-		per_cpu(cpufreq_cpu_data, j) = policy;
-		per_cpu(cpufreq_policy_cpu, j) = policy->cpu;
-	}
-	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
-
 	ret = cpufreq_add_dev_symlink(cpu, policy);
 	if (ret)
 		goto err_out_kobj_put;
 
+	return ret;
+
+err_out_kobj_put:
+	kobject_put(&policy->kobj);
+	wait_for_completion(&policy->kobj_unregister);
+	return ret;
+}
+
+static void cpufreq_init_policy(struct cpufreq_policy *policy)
+{
+	struct cpufreq_policy new_policy;
+	int ret = 0;
+
 	memcpy(&new_policy, policy, sizeof(struct cpufreq_policy));
 	/* assure that the starting sequence is run in __cpufreq_set_policy */
 	policy->governor = NULL;
@@ -895,12 +898,6 @@ static int cpufreq_add_dev_interface(unsigned int cpu,
 		if (cpufreq_driver->exit)
 			cpufreq_driver->exit(policy);
 	}
-	return ret;
-
-err_out_kobj_put:
-	kobject_put(&policy->kobj);
-	wait_for_completion(&policy->kobj_unregister);
-	return ret;
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
@@ -1074,10 +1071,19 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 	}
 #endif
 
+	write_lock_irqsave(&cpufreq_driver_lock, flags);
+	for_each_cpu(j, policy->cpus) {
+		per_cpu(cpufreq_cpu_data, j) = policy;
+		per_cpu(cpufreq_policy_cpu, j) = policy->cpu;
+	}
+	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
+
 	ret = cpufreq_add_dev_interface(cpu, policy, dev);
 	if (ret)
 		goto err_out_unregister;
 
+	cpufreq_init_policy(policy);
+
 	kobject_uevent(&policy->kobj, KOBJ_ADD);
 	module_put(cpufreq_driver->owner);
 	pr_debug("initialization complete\n");
@@ -1086,8 +1092,11 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 
 err_out_unregister:
 	write_lock_irqsave(&cpufreq_driver_lock, flags);
-	for_each_cpu(j, policy->cpus)
+	for_each_cpu(j, policy->cpus) {
 		per_cpu(cpufreq_cpu_data, j) = NULL;
+		if (j != cpu)
+			per_cpu(cpufreq_policy_cpu, j) = -1;
+	}
 	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
 	kobject_put(&policy->kobj);


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 5/8] cpufreq: Extract the handover of policy cpu to a helper function
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (3 preceding siblings ...)
  2013-07-11 22:16 ` [PATCH 4/8] cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface Srivatsa S. Bhat
@ 2013-07-11 22:16 ` Srivatsa S. Bhat
  2013-07-12  7:19   ` Viresh Kumar
  2013-07-11 22:16 ` [PATCH 6/8] cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown Srivatsa S. Bhat
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:16 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

During cpu offline, when the policy->cpu is going down, some other CPU
present in the policy->cpus mask is nominated as the new policy->cpu.
Extract this functionality from __cpufreq_remove_dev() and implement
it in a helper function. This helps in upcoming code reorganization.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c |   62 ++++++++++++++++++++++++++++-----------------
 1 file changed, 38 insertions(+), 24 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 2ab39f3..efdb607 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1128,6 +1128,38 @@ static void update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu)
 			CPUFREQ_UPDATE_POLICY_CPU, policy);
 }
 
+static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *data,
+					   unsigned int old_cpu)
+{
+	struct device *cpu_dev;
+	unsigned long flags;
+	int ret;
+
+	/* first sibling now owns the new sysfs dir */
+	cpu_dev = get_cpu_device(cpumask_first(data->cpus));
+	sysfs_remove_link(&cpu_dev->kobj, "cpufreq");
+	ret = kobject_move(&data->kobj, &cpu_dev->kobj);
+	if (ret) {
+		pr_err("%s: Failed to move kobj: %d", __func__, ret);
+
+		WARN_ON(lock_policy_rwsem_write(old_cpu));
+		cpumask_set_cpu(old_cpu, data->cpus);
+
+		write_lock_irqsave(&cpufreq_driver_lock, flags);
+		per_cpu(cpufreq_cpu_data, old_cpu) = data;
+		write_unlock_irqrestore(&cpufreq_driver_lock, flags);
+
+		unlock_policy_rwsem_write(old_cpu);
+
+		ret = sysfs_create_link(&cpu_dev->kobj, &data->kobj,
+					"cpufreq");
+
+		return -EINVAL;
+	}
+
+	return cpu_dev->id;
+}
+
 /**
  * __cpufreq_remove_dev - remove a CPU device
  *
@@ -1138,12 +1170,11 @@ static void update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu)
 static int __cpufreq_remove_dev(struct device *dev,
 		struct subsys_interface *sif)
 {
-	unsigned int cpu = dev->id, ret, cpus;
+	unsigned int cpu = dev->id, cpus, new_cpu;
 	unsigned long flags;
 	struct cpufreq_policy *data;
 	struct kobject *kobj;
 	struct completion *cmp;
-	struct device *cpu_dev;
 
 	pr_debug("%s: unregistering CPU %u\n", __func__, cpu);
 
@@ -1178,32 +1209,15 @@ static int __cpufreq_remove_dev(struct device *dev,
 	if (cpu != data->cpu) {
 		sysfs_remove_link(&dev->kobj, "cpufreq");
 	} else if (cpus > 1) {
-		/* first sibling now owns the new sysfs dir */
-		cpu_dev = get_cpu_device(cpumask_first(data->cpus));
-		sysfs_remove_link(&cpu_dev->kobj, "cpufreq");
-		ret = kobject_move(&data->kobj, &cpu_dev->kobj);
-		if (ret) {
-			pr_err("%s: Failed to move kobj: %d", __func__, ret);
 
+		new_cpu = cpufreq_nominate_new_policy_cpu(data, cpu);
+		if (new_cpu >= 0) {
 			WARN_ON(lock_policy_rwsem_write(cpu));
-			cpumask_set_cpu(cpu, data->cpus);
-
-			write_lock_irqsave(&cpufreq_driver_lock, flags);
-			per_cpu(cpufreq_cpu_data, cpu) = data;
-			write_unlock_irqrestore(&cpufreq_driver_lock, flags);
-
+			update_policy_cpu(data, new_cpu);
 			unlock_policy_rwsem_write(cpu);
-
-			ret = sysfs_create_link(&cpu_dev->kobj, &data->kobj,
-					"cpufreq");
-			return -EINVAL;
+			pr_debug("%s: policy Kobject moved to cpu: %d "
+				 "from: %d\n",__func__, new_cpu, cpu);
 		}
-
-		WARN_ON(lock_policy_rwsem_write(cpu));
-		update_policy_cpu(data, cpu_dev->id);
-		unlock_policy_rwsem_write(cpu);
-		pr_debug("%s: policy Kobject moved to cpu: %d from: %d\n",
-				__func__, cpu_dev->id, cpu);
 	}
 
 	if ((cpus == 1) && (cpufreq_driver->target))


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 6/8] cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (4 preceding siblings ...)
  2013-07-11 22:16 ` [PATCH 5/8] cpufreq: Extract the handover of policy cpu to a helper function Srivatsa S. Bhat
@ 2013-07-11 22:16 ` Srivatsa S. Bhat
  2013-07-12  7:31   ` Viresh Kumar
  2013-07-11 22:17 ` [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume Srivatsa S. Bhat
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:16 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

During suspend/resume we would like to do a light-weight init/teardown of
CPUs in the cpufreq subsystem and preserve certain things such as sysfs files
etc across suspend/resume transitions. Add a flag called 'frozen' to help
distinguish the full init/teardown sequence from the light-weight one.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c |   66 ++++++++++++++++++++++++++++-----------------
 1 file changed, 41 insertions(+), 25 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index efdb607..1128753 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -902,7 +902,7 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy)
 
 #ifdef CONFIG_HOTPLUG_CPU
 static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling,
-				  struct device *dev)
+				  struct device *dev, bool frozen)
 {
 	struct cpufreq_policy *policy;
 	int ret = 0, has_target = !!cpufreq_driver->target;
@@ -930,13 +930,15 @@ static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling,
 		__cpufreq_governor(policy, CPUFREQ_GOV_LIMITS);
 	}
 
+	/* Don't touch sysfs links during light-weight init */
+	if (frozen)
+		return 0;
+
 	ret = sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq");
-	if (ret) {
+	if (ret)
 		cpufreq_cpu_put(policy);
-		return ret;
-	}
 
-	return 0;
+	return ret;
 }
 #endif
 
@@ -971,16 +973,8 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
 	kfree(policy);
 }
 
-/**
- * cpufreq_add_dev - add a CPU device
- *
- * Adds the cpufreq interface for a CPU device.
- *
- * The Oracle says: try running cpufreq registration/unregistration concurrently
- * with with cpu hotplugging and all hell will break loose. Tried to clean this
- * mess up, but more thorough testing is needed. - Mathieu
- */
-static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
+static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif,
+			     bool frozen)
 {
 	unsigned int j, cpu = dev->id;
 	int ret = -ENOMEM;
@@ -1012,7 +1006,8 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 		struct cpufreq_policy *cp = per_cpu(cpufreq_cpu_data, sibling);
 		if (cp && cpumask_test_cpu(cpu, cp->related_cpus)) {
 			read_unlock_irqrestore(&cpufreq_driver_lock, flags);
-			return cpufreq_add_policy_cpu(cpu, sibling, dev);
+			return cpufreq_add_policy_cpu(cpu, sibling, dev,
+						      frozen);
 		}
 	}
 	read_unlock_irqrestore(&cpufreq_driver_lock, flags);
@@ -1078,9 +1073,11 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
 	}
 	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
-	ret = cpufreq_add_dev_interface(cpu, policy, dev);
-	if (ret)
-		goto err_out_unregister;
+	if (!frozen) {
+		ret = cpufreq_add_dev_interface(cpu, policy, dev);
+		if (ret)
+			goto err_out_unregister;
+	}
 
 	cpufreq_init_policy(policy);
 
@@ -1111,6 +1108,20 @@ module_out:
 	return ret;
 }
 
+/**
+ * cpufreq_add_dev - add a CPU device
+ *
+ * Adds the cpufreq interface for a CPU device.
+ *
+ * The Oracle says: try running cpufreq registration/unregistration concurrently
+ * with with cpu hotplugging and all hell will break loose. Tried to clean this
+ * mess up, but more thorough testing is needed. - Mathieu
+ */
+static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
+{
+	return __cpufreq_add_dev(dev, sif, false);
+}
+
 static void update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu)
 {
 	int j;
@@ -1129,7 +1140,7 @@ static void update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu)
 }
 
 static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *data,
-					   unsigned int old_cpu)
+					   unsigned int old_cpu, bool frozen)
 {
 	struct device *cpu_dev;
 	unsigned long flags;
@@ -1137,6 +1148,11 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *data,
 
 	/* first sibling now owns the new sysfs dir */
 	cpu_dev = get_cpu_device(cpumask_first(data->cpus));
+
+	/* Don't touch sysfs files during light-weight tear-down */
+	if (frozen)
+		return cpu_dev->id;
+
 	sysfs_remove_link(&cpu_dev->kobj, "cpufreq");
 	ret = kobject_move(&data->kobj, &cpu_dev->kobj);
 	if (ret) {
@@ -1168,7 +1184,7 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *data,
  * This routine frees the rwsem before returning.
  */
 static int __cpufreq_remove_dev(struct device *dev,
-		struct subsys_interface *sif)
+				struct subsys_interface *sif, bool frozen)
 {
 	unsigned int cpu = dev->id, cpus, new_cpu;
 	unsigned long flags;
@@ -1206,11 +1222,11 @@ static int __cpufreq_remove_dev(struct device *dev,
 		cpumask_clear_cpu(cpu, data->cpus);
 	unlock_policy_rwsem_write(cpu);
 
-	if (cpu != data->cpu) {
+	if (cpu != data->cpu && !frozen) {
 		sysfs_remove_link(&dev->kobj, "cpufreq");
 	} else if (cpus > 1) {
 
-		new_cpu = cpufreq_nominate_new_policy_cpu(data, cpu);
+		new_cpu = cpufreq_nominate_new_policy_cpu(data, cpu, frozen);
 		if (new_cpu >= 0) {
 			WARN_ON(lock_policy_rwsem_write(cpu));
 			update_policy_cpu(data, new_cpu);
@@ -1264,7 +1280,7 @@ static int cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
 	if (cpu_is_offline(cpu))
 		return 0;
 
-	retval = __cpufreq_remove_dev(dev, sif);
+	retval = __cpufreq_remove_dev(dev, sif, false);
 	return retval;
 }
 
@@ -1990,7 +2006,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
 			break;
 		case CPU_DOWN_PREPARE:
 		case CPU_DOWN_PREPARE_FROZEN:
-			__cpufreq_remove_dev(dev, NULL);
+			__cpufreq_remove_dev(dev, NULL, false);
 			break;
 		case CPU_DOWN_FAILED:
 		case CPU_DOWN_FAILED_FROZEN:


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (5 preceding siblings ...)
  2013-07-11 22:16 ` [PATCH 6/8] cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown Srivatsa S. Bhat
@ 2013-07-11 22:17 ` Srivatsa S. Bhat
  2013-07-15  9:55   ` Viresh Kumar
  2013-07-11 22:17 ` [PATCH 8/8] cpufreq: Perform light-weight init/teardown during suspend/resume Srivatsa S. Bhat
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:17 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

To perform light-weight cpu-init and teardown in the cpufreq subsystem
during suspend/resume, we need to separate out the 2 main functionalities
of the cpufreq CPU hotplug callbacks, as outlined below:

1. Init/tear-down of core cpufreq and CPU-specific components, which are
   critical to the correct functioning of the cpufreq subsystem.

2. Init/tear-down of cpufreq sysfs files during suspend/resume.

The first part requires accurate updates to the policy structure such as
its ->cpus and ->related_cpus masks, whereas the second part requires that
the policy->kobj structure is not released or re-initialized during
suspend/resume.

To handle both these requirements, we need to allow updates to the policy
structure throughout suspend/resume, but prevent the structure from getting
freed up. Also, we must have a mechanism by which the cpu-up callbacks can
restore the policy structure, without allocating things afresh. (That also
helps avoid memory leaks).

To achieve this, we use 2 schemes:
a. Use a fallback per-cpu storage area for preserving the policy structures
   during suspend, so that they can be restored during resume appropriately.

b. Use the 'frozen' flag to determine when to free or allocate the policy
   structure vs when to restore the policy from the saved fallback storage.
   Thus we can successfully preserve the structure across suspend/resume.

Effectively, this helps us complete the separation of the 'light-weight'
and the 'full' init/tear-down sequences in the cpufreq subsystem, so that
this can be made use of in the suspend/resume scenario.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c |   69 ++++++++++++++++++++++++++++++++++-----------
 1 file changed, 52 insertions(+), 17 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 1128753..15ced5f 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -44,6 +44,7 @@
  */
 static struct cpufreq_driver *cpufreq_driver;
 static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data);
+static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data_fallback);
 static DEFINE_RWLOCK(cpufreq_driver_lock);
 static DEFINE_MUTEX(cpufreq_governor_lock);
 
@@ -942,6 +943,20 @@ static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling,
 }
 #endif
 
+static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu)
+{
+	struct cpufreq_policy *policy;
+	unsigned long flags;
+
+	write_lock_irqsave(&cpufreq_driver_lock, flags);
+
+	policy = per_cpu(cpufreq_cpu_data_fallback, cpu);
+
+	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
+
+	return policy;
+}
+
 static struct cpufreq_policy *cpufreq_policy_alloc(void)
 {
 	struct cpufreq_policy *policy;
@@ -1019,7 +1034,12 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif,
 		goto module_out;
 	}
 
-	policy = cpufreq_policy_alloc();
+	if (frozen)
+		/* Restore the saved policy when doing light-weight init */
+		policy = cpufreq_policy_restore(cpu);
+	else
+		policy = cpufreq_policy_alloc();
+
 	if (!policy)
 		goto nomem_out;
 
@@ -1199,6 +1219,10 @@ static int __cpufreq_remove_dev(struct device *dev,
 	data = per_cpu(cpufreq_cpu_data, cpu);
 	per_cpu(cpufreq_cpu_data, cpu) = NULL;
 
+	/* Save the policy somewhere when doing a light-weight tear-down */
+	if (frozen)
+		per_cpu(cpufreq_cpu_data_fallback, cpu) = data;
+
 	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
 	if (!data) {
@@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device *dev,
 	if ((cpus == 1) && (cpufreq_driver->target))
 		__cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
 
-	pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
-	cpufreq_cpu_put(data);
+	if (!frozen) {
+		pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
+		cpufreq_cpu_put(data);
+	}
 
 	/* If cpu is last user of policy, free policy */
 	if (cpus == 1) {
-		lock_policy_rwsem_read(cpu);
-		kobj = &data->kobj;
-		cmp = &data->kobj_unregister;
-		unlock_policy_rwsem_read(cpu);
-		kobject_put(kobj);
-
-		/* we need to make sure that the underlying kobj is actually
-		 * not referenced anymore by anybody before we proceed with
-		 * unloading.
-		 */
-		pr_debug("waiting for dropping of refcount\n");
-		wait_for_completion(cmp);
-		pr_debug("wait complete\n");
+		if (!frozen) {
+			lock_policy_rwsem_read(cpu);
+			kobj = &data->kobj;
+			cmp = &data->kobj_unregister;
+			unlock_policy_rwsem_read(cpu);
+			kobject_put(kobj);
+
+			/*
+			 * We need to make sure that the underlying kobj is
+			 * actually not referenced anymore by anybody before we
+			 * proceed with unloading.
+			 */
+			pr_debug("waiting for dropping of refcount\n");
+			wait_for_completion(cmp);
+			pr_debug("wait complete\n");
+		}
 
+		/*
+		 * Perform the ->exit() even during light-weight tear-down,
+		 * since this is a core component, and is essential for the
+		 * the subsequent light-weight ->init() to succeed.
+		 */
 		if (cpufreq_driver->exit)
 			cpufreq_driver->exit(data);
 
-		cpufreq_policy_free(data);
+		if (!frozen)
+			cpufreq_policy_free(data);
 
 	} else if (cpufreq_driver->target) {
 		__cpufreq_governor(data, CPUFREQ_GOV_START);


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 8/8] cpufreq: Perform light-weight init/teardown during suspend/resume
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (6 preceding siblings ...)
  2013-07-11 22:17 ` [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume Srivatsa S. Bhat
@ 2013-07-11 22:17 ` Srivatsa S. Bhat
  2013-07-11 22:25   ` Jarzmik, Robert
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:17 UTC (permalink / raw)
  To: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie
  Cc: stern, Srivatsa S. Bhat, linux-pm, linux-kernel

Now that we have the infrastructure to perform a light-weight init/tear-down,
use that in the cpufreq CPU hotplug notifier when invoked from the
suspend/resume path.

This also ensures that the file permissions of the cpufreq sysfs files are
preserved across suspend/resume, something which commit a66b2e (cpufreq:
Preserve sysfs files across suspend/resume) originally intended to do, but
had to be reverted due to other problems.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 drivers/cpufreq/cpufreq.c       |   18 +++++++++++-------
 drivers/cpufreq/cpufreq_stats.c |    2 --
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 15ced5f..c7f59e8 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2030,22 +2030,26 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
 {
 	unsigned int cpu = (unsigned long)hcpu;
 	struct device *dev;
+	bool frozen = false;
 
 	dev = get_cpu_device(cpu);
 	if (dev) {
-		switch (action) {
+
+		if (action & CPU_TASKS_FROZEN)
+			frozen = true;
+
+		switch (action & ~CPU_TASKS_FROZEN) {
 		case CPU_ONLINE:
-		case CPU_ONLINE_FROZEN:
-			cpufreq_add_dev(dev, NULL);
+			__cpufreq_add_dev(dev, NULL, frozen);
 			cpufreq_update_policy(cpu);
 			break;
+
 		case CPU_DOWN_PREPARE:
-		case CPU_DOWN_PREPARE_FROZEN:
-			__cpufreq_remove_dev(dev, NULL, false);
+			__cpufreq_remove_dev(dev, NULL, frozen);
 			break;
+
 		case CPU_DOWN_FAILED:
-		case CPU_DOWN_FAILED_FROZEN:
-			cpufreq_add_dev(dev, NULL);
+			__cpufreq_add_dev(dev, NULL, frozen);
 			break;
 		}
 	}
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index a3e7475..4e1eb3f 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -349,11 +349,9 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
 
 	switch (action) {
 	case CPU_DOWN_PREPARE:
-	case CPU_DOWN_PREPARE_FROZEN:
 		cpufreq_stats_free_sysfs(cpu);
 		break;
 	case CPU_DEAD:
-	case CPU_DEAD_FROZEN:
 		cpufreq_stats_free_table(cpu);
 		break;
 	}


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:33 ` Rafael J. Wysocki
@ 2013-07-11 22:23   ` Srivatsa S. Bhat
  2013-07-16 15:15     ` Toralf Förster
  2013-07-15 17:38   ` Toralf Förster
  1 sibling, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-11 22:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/12/2013 04:03 AM, Rafael J. Wysocki wrote:
> On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
>>
>> Hi,
> 
> Hi,
> 
>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
>> some subtle regressions in the cpufreq subsystem during suspend/resume.
>> This patchset is aimed at rectifying those problems, by fixing the regression
>> as well as achieving the original goal of that commit in a proper way.
>>
>> Patch 1 reverts the above commit, and is CC'ed to stable.
>>
>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
>> in as general cleanups as well. This reorganization builds a base that the
>> rest of the patches will make use of.
>>
>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
>> across suspend/resume.
>>
>> All the patches apply on current mainline.
>>
>>
>> Robert, Durgadoss, it would be great if you could try it out and see if it works
>> well for your usecase. I tested it locally and cpufreq related files did retain
>> their permissions across suspend/resume. Let me know if it works fine in your
>> setup too.
>>
>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>> whether their systems work fine after:
>> a. applying only the first commit (this is what gets backported to stable)
>> b. applying all the commits
>>
>> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
>> testing this patchset. Though that patch also touches cpufreq subsystem, it
>> doesn't affect this patchset in any way and there is absolutely no dependency
>> between the two in terms of code. That fix just makes basic CPU hotplug work
>> without locking up on current mainline).
>>
>> [1]. https://lkml.org/lkml/2013/7/10/611
>>
>>
>> Thank you very much!
> 
> Thanks Srivatsa!
> 
> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
> hate them.  This way we'll have some more testing coverage before they reach
> the mainline hopefully.
> 

Sounds great! Thanks a lot Rafael!
 
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* RE: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
@ 2013-07-11 22:25   ` Jarzmik, Robert
  2013-07-11 22:15 ` [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy() Srivatsa S. Bhat
                     ` (10 subsequent siblings)
  11 siblings, 0 replies; 53+ messages in thread
From: Jarzmik, Robert @ 2013-07-11 22:25 UTC (permalink / raw)
  To: Srivatsa S. Bhat, rjw, viresh.kumar, toralf.foerster, R,
	Durgadoss, Lan, Tianyu, lantianyu1986, dirk.brandewie
  Cc: stern, linux-pm, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1277 bytes --]

-----Original Message-----
From: Srivatsa S. Bhat [mailto:srivatsa.bhat@linux.vnet.ibm.com] 
Sent: Friday, July 12, 2013 00:15

> Robert, Durgadoss, it would be great if you could try it out and
>  see if it works well for your usecase. I tested it locally and 
> cpufreq related files did retain their permissions across 
> suspend/resume. Let me know if it works fine in your setup too.

Sure,  I'll check for Monday last delay, if that's not too late for you, as I'm a bit in a hurry right now, but I'll give it a try in the WE I think.

Cheers.

--
Robert
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 53+ messages in thread

* RE: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
@ 2013-07-11 22:25   ` Jarzmik, Robert
  0 siblings, 0 replies; 53+ messages in thread
From: Jarzmik, Robert @ 2013-07-11 22:25 UTC (permalink / raw)
  To: Srivatsa S. Bhat, rjw, viresh.kumar, toralf.foerster, R,
	Durgadoss, Lan, Tianyu, lantianyu1986, dirk.brandewie
  Cc: stern, linux-pm, linux-kernel

-----Original Message-----
From: Srivatsa S. Bhat [mailto:srivatsa.bhat@linux.vnet.ibm.com] 
Sent: Friday, July 12, 2013 00:15

> Robert, Durgadoss, it would be great if you could try it out and
>  see if it works well for your usecase. I tested it locally and 
> cpufreq related files did retain their permissions across 
> suspend/resume. Let me know if it works fine in your setup too.

Sure,  I'll check for Monday last delay, if that's not too late for you, as I'm a bit in a hurry right now, but I'll give it a try in the WE I think.

Cheers.

--
Robert
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (8 preceding siblings ...)
  2013-07-11 22:25   ` Jarzmik, Robert
@ 2013-07-11 22:33 ` Rafael J. Wysocki
  2013-07-11 22:23   ` Srivatsa S. Bhat
  2013-07-15 17:38   ` Toralf Förster
  2013-07-13  9:23 ` Toralf Förster
  2013-07-15  8:27 ` Lan Tianyu
  11 siblings, 2 replies; 53+ messages in thread
From: Rafael J. Wysocki @ 2013-07-11 22:33 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
> 
> Hi,

Hi,

> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
> some subtle regressions in the cpufreq subsystem during suspend/resume.
> This patchset is aimed at rectifying those problems, by fixing the regression
> as well as achieving the original goal of that commit in a proper way.
> 
> Patch 1 reverts the above commit, and is CC'ed to stable.
> 
> Patches 2 - 5 reorganize the code and have no functional impact, and can go
> in as general cleanups as well. This reorganization builds a base that the
> rest of the patches will make use of.
> 
> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
> across suspend/resume.
> 
> All the patches apply on current mainline.
> 
> 
> Robert, Durgadoss, it would be great if you could try it out and see if it works
> well for your usecase. I tested it locally and cpufreq related files did retain
> their permissions across suspend/resume. Let me know if it works fine in your
> setup too.
> 
> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
> whether their systems work fine after:
> a. applying only the first commit (this is what gets backported to stable)
> b. applying all the commits
> 
> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
> testing this patchset. Though that patch also touches cpufreq subsystem, it
> doesn't affect this patchset in any way and there is absolutely no dependency
> between the two in terms of code. That fix just makes basic CPU hotplug work
> without locking up on current mainline).
> 
> [1]. https://lkml.org/lkml/2013/7/10/611
> 
> 
> Thank you very much!

Thanks Srivatsa!

I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
hate them.  This way we'll have some more testing coverage before they reach
the mainline hopefully.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy()
  2013-07-11 22:15 ` [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy() Srivatsa S. Bhat
@ 2013-07-12  7:06   ` Viresh Kumar
  2013-07-15  6:20     ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-12  7:06 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 12 July 2013 03:45, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> The call to cpufreq_update_policy() is placed in the CPU hotplug callback
> of cpufreq_stats, which has a higher priority than the CPU hotplug callback
> of cpufreq-core. As a result, during CPU_ONLINE/CPU_ONLINE_FROZEN, we end up
> calling cpufreq_update_policy() *before* calling cpufreq_add_dev() !
> And for uninitialized CPUs, it just returns silently, not doing anything.

Hmm..

> To add to it, cpufreq_stats is not even the right place to call
> cpufreq_update_policy() to begin with. The cpufreq core ought to handle
> this in its own callback, from an elegance/relevance perspective.
>
> So move the invocation of cpufreq_update_policy() to cpufreq_cpu_callback,
> and place it *after* cpufreq_add_dev().
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
>
>  drivers/cpufreq/cpufreq.c       |    1 +
>  drivers/cpufreq/cpufreq_stats.c |    6 ------
>  2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index ccc6eab..f8c3100 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1943,6 +1943,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
>                 case CPU_ONLINE:
>                 case CPU_ONLINE_FROZEN:
>                         cpufreq_add_dev(dev, NULL);
> +                       cpufreq_update_policy(cpu);

Do we need to call this for every hotplug of cpu? I am not
talking about suspend/resume here.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure
  2013-07-11 22:16 ` [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure Srivatsa S. Bhat
@ 2013-07-12  7:09   ` Viresh Kumar
  2013-07-15  6:24     ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-12  7:09 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 12 July 2013 03:46, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> Separate out the allocation of the cpufreq policy structure (along with
> its error handling) to a helper function. This makes the code easier to
> read and also helps with some upcoming code reorganization.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
>
>  drivers/cpufreq/cpufreq.c |   50 ++++++++++++++++++++++++++++++++-------------
>  1 file changed, 35 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index f8c3100..ca14dc2 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -943,6 +943,37 @@ static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling,
>  }
>  #endif
>
> +static struct cpufreq_policy *cpufreq_policy_alloc(void)
> +{
> +       struct cpufreq_policy *policy;
> +
> +       policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL);

sizeof(*policy) ??

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4/8] cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface
  2013-07-11 22:16 ` [PATCH 4/8] cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface Srivatsa S. Bhat
@ 2013-07-12  7:17   ` Viresh Kumar
  0 siblings, 0 replies; 53+ messages in thread
From: Viresh Kumar @ 2013-07-12  7:17 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 12 July 2013 03:46, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> cpufreq_add_dev_interface() includes the work of exposing the interface
> to the device, as well as a lot of unrelated stuff. Move the latter to
> cpufreq_add_dev(), where it is more appropriate.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
>
>  drivers/cpufreq/cpufreq.c |   43 ++++++++++++++++++++++++++-----------------
>  1 file changed, 26 insertions(+), 17 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume
  2013-07-11 22:15 ` [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume Srivatsa S. Bhat
@ 2013-07-12  7:18   ` Viresh Kumar
  2013-07-13 12:46     ` Paul Bolle
  0 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-12  7:18 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 12 July 2013 03:45, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) has
> unfortunately caused several things in the cpufreq subsystem to break subtly
> after a suspend/resume cycle.
>
> The intention of that patch was to retain the file permissions of the
> cpufreq related sysfs files across suspend/resume. To achieve that, the commit
> completely removed the calls to cpufreq_add_dev() and __cpufreq_remove_dev()
> during suspend/resume transitions. But the problem is that those functions
> do 2 kinds of things:
>   1. Low-level initialization/tear-down that are critical to the correct
>      functioning of cpufreq-core.
>   2. Kobject and sysfs related initialization/teardown.
>
> Ideally we should have reorganized the code to cleanly separate these two
> responsibilities, and skipped only the sysfs related parts during
> suspend/resume. Since we skipped the entire callbacks instead (which also
> included some CPU and cpufreq-specific critical components), cpufreq
> subsystem started behaving erratically after suspend/resume.
>
> So revert the commit to fix the regression. We'll revisit and address the
> original goal of that commit separately, since it involves quite a bit of
> careful code reorganization and appears to be non-trivial.
>
> (While reverting the commit, note that another commit f51e1eb "cpufreq:
> Fix cpufreq regression after suspend/resume" already reverted part of the
> original set of changes. So revert only the remaining ones).
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
>
>  drivers/cpufreq/cpufreq.c       |    4 +++-
>  drivers/cpufreq/cpufreq_stats.c |    6 ++----
>  2 files changed, 5 insertions(+), 5 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 5/8] cpufreq: Extract the handover of policy cpu to a helper function
  2013-07-11 22:16 ` [PATCH 5/8] cpufreq: Extract the handover of policy cpu to a helper function Srivatsa S. Bhat
@ 2013-07-12  7:19   ` Viresh Kumar
  0 siblings, 0 replies; 53+ messages in thread
From: Viresh Kumar @ 2013-07-12  7:19 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 12 July 2013 03:46, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> During cpu offline, when the policy->cpu is going down, some other CPU
> present in the policy->cpus mask is nominated as the new policy->cpu.
> Extract this functionality from __cpufreq_remove_dev() and implement
> it in a helper function. This helps in upcoming code reorganization.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
>
>  drivers/cpufreq/cpufreq.c |   62 ++++++++++++++++++++++++++++-----------------
>  1 file changed, 38 insertions(+), 24 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 6/8] cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown
  2013-07-11 22:16 ` [PATCH 6/8] cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown Srivatsa S. Bhat
@ 2013-07-12  7:31   ` Viresh Kumar
  0 siblings, 0 replies; 53+ messages in thread
From: Viresh Kumar @ 2013-07-12  7:31 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 12 July 2013 03:46, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> During suspend/resume we would like to do a light-weight init/teardown of
> CPUs in the cpufreq subsystem and preserve certain things such as sysfs files
> etc across suspend/resume transitions. Add a flag called 'frozen' to help
> distinguish the full init/teardown sequence from the light-weight one.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
>
>  drivers/cpufreq/cpufreq.c |   66 ++++++++++++++++++++++++++++-----------------
>  1 file changed, 41 insertions(+), 25 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (9 preceding siblings ...)
  2013-07-11 22:33 ` Rafael J. Wysocki
@ 2013-07-13  9:23 ` Toralf Förster
  2013-07-13 13:50   ` Toralf Förster
  2013-07-15  8:27 ` Lan Tianyu
  11 siblings, 1 reply; 53+ messages in thread
From: Toralf Förster @ 2013-07-13  9:23 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, viresh.kumar, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/12/2013 12:15 AM, Srivatsa S. Bhat wrote:
> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
> whether their systems work fine after:
> a. applying only the first commit (this is what gets backported to stable)

applied on top of straight 3.10 .0 : Breaks my system completely -
trying s2ram just blanks the console, lets the power led blinking,
neither sys-rq nor anything else worked now, no output to console nor to
syslog

> b. applying all the commits
patch 2#8 doesn't apply at 3.10.0 (neither after patch 1#8 nor directly)

FWIW /me double checked all those test results

-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume
  2013-07-12  7:18   ` Viresh Kumar
@ 2013-07-13 12:46     ` Paul Bolle
  2013-07-15  6:18       ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Paul Bolle @ 2013-07-13 12:46 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: Viresh Kumar, rjw, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Fri, 2013-07-12 at 12:48 +0530, Viresh Kumar wrote:
> On 12 July 2013 03:45, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
> > commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) has
> > unfortunately caused several things in the cpufreq subsystem to break subtly
> > after a suspend/resume cycle.
> >
> > The intention of that patch was to retain the file permissions of the
> > cpufreq related sysfs files across suspend/resume. To achieve that, the commit
> > completely removed the calls to cpufreq_add_dev() and __cpufreq_remove_dev()
> > during suspend/resume transitions. But the problem is that those functions
> > do 2 kinds of things:
> >   1. Low-level initialization/tear-down that are critical to the correct
> >      functioning of cpufreq-core.
> >   2. Kobject and sysfs related initialization/teardown.
> >
> > Ideally we should have reorganized the code to cleanly separate these two
> > responsibilities, and skipped only the sysfs related parts during
> > suspend/resume. Since we skipped the entire callbacks instead (which also
> > included some CPU and cpufreq-specific critical components), cpufreq
> > subsystem started behaving erratically after suspend/resume.
> >
> > So revert the commit to fix the regression. We'll revisit and address the
> > original goal of that commit separately, since it involves quite a bit of
> > careful code reorganization and appears to be non-trivial.
> >
> > (While reverting the commit, note that another commit f51e1eb "cpufreq:
> > Fix cpufreq regression after suspend/resume" already reverted part of the
> > original set of changes. So revert only the remaining ones).
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> > ---
> >
> >  drivers/cpufreq/cpufreq.c       |    4 +++-
> >  drivers/cpufreq/cpufreq_stats.c |    6 ++----
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

This seems to fix the "core stuck at some frequency after resume" issue
I ran into since v3.10. So:

Tested-by: Paul Bolle <pebolle@tiscali.nl>


Paul Bolle


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-13  9:23 ` Toralf Förster
@ 2013-07-13 13:50   ` Toralf Förster
  2013-07-15  6:40     ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Toralf Förster @ 2013-07-13 13:50 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, viresh.kumar, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/13/2013 11:23 AM, Toralf Förster wrote:
> On 07/12/2013 12:15 AM, Srivatsa S. Bhat wrote:
>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>> whether their systems work fine after:
>> a. applying only the first commit (this is what gets backported to stable)
> 
> applied on top of straight 3.10 .0 : Breaks my system completely -

overlooked, that the 8 patches are 3.11/3.12 material - but nevertheless :

Applied 1/8 on top of v3.10-9289-g9903883 brought same bad picture as
described for 3.10.0

And applying patches 1-8 on top of that commit id just gives the same
pciture - systems hangs during s2ram completly


> trying s2ram just blanks the console, lets the power led blinking,
> neither sys-rq nor anything else worked now, no output to console nor to
> syslog
> 
>> b. applying all the commits
> patch 2#8 doesn't apply at 3.10.0 (neither after patch 1#8 nor directly)

I attached the .config I'm using for my tests
(/me wonders if it is worth to notice, that it is a 32bit system booted
from an external USB drive ?)

-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume
  2013-07-13 12:46     ` Paul Bolle
@ 2013-07-15  6:18       ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15  6:18 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Viresh Kumar, rjw, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/13/2013 06:16 PM, Paul Bolle wrote:
> On Fri, 2013-07-12 at 12:48 +0530, Viresh Kumar wrote:
>> On 12 July 2013 03:45, Srivatsa S. Bhat
>> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>>> commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) has
>>> unfortunately caused several things in the cpufreq subsystem to break subtly
>>> after a suspend/resume cycle.
>>>
>>> The intention of that patch was to retain the file permissions of the
>>> cpufreq related sysfs files across suspend/resume. To achieve that, the commit
>>> completely removed the calls to cpufreq_add_dev() and __cpufreq_remove_dev()
>>> during suspend/resume transitions. But the problem is that those functions
>>> do 2 kinds of things:
>>>   1. Low-level initialization/tear-down that are critical to the correct
>>>      functioning of cpufreq-core.
>>>   2. Kobject and sysfs related initialization/teardown.
>>>
>>> Ideally we should have reorganized the code to cleanly separate these two
>>> responsibilities, and skipped only the sysfs related parts during
>>> suspend/resume. Since we skipped the entire callbacks instead (which also
>>> included some CPU and cpufreq-specific critical components), cpufreq
>>> subsystem started behaving erratically after suspend/resume.
>>>
>>> So revert the commit to fix the regression. We'll revisit and address the
>>> original goal of that commit separately, since it involves quite a bit of
>>> careful code reorganization and appears to be non-trivial.
>>>
>>> (While reverting the commit, note that another commit f51e1eb "cpufreq:
>>> Fix cpufreq regression after suspend/resume" already reverted part of the
>>> original set of changes. So revert only the remaining ones).
>>>
>>> Cc: stable@vger.kernel.org
>>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
>>> ---
>>>
>>>  drivers/cpufreq/cpufreq.c       |    4 +++-
>>>  drivers/cpufreq/cpufreq_stats.c |    6 ++----
>>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> This seems to fix the "core stuck at some frequency after resume" issue
> I ran into since v3.10. So:
> 
> Tested-by: Paul Bolle <pebolle@tiscali.nl>
> 

Thanks Paul!
 
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy()
  2013-07-12  7:06   ` Viresh Kumar
@ 2013-07-15  6:20     ` Srivatsa S. Bhat
  2013-07-15 11:37       ` Rafael J. Wysocki
  0 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15  6:20 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/12/2013 12:36 PM, Viresh Kumar wrote:
> On 12 July 2013 03:45, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> The call to cpufreq_update_policy() is placed in the CPU hotplug callback
>> of cpufreq_stats, which has a higher priority than the CPU hotplug callback
>> of cpufreq-core. As a result, during CPU_ONLINE/CPU_ONLINE_FROZEN, we end up
>> calling cpufreq_update_policy() *before* calling cpufreq_add_dev() !
>> And for uninitialized CPUs, it just returns silently, not doing anything.
> 
> Hmm..
> 
>> To add to it, cpufreq_stats is not even the right place to call
>> cpufreq_update_policy() to begin with. The cpufreq core ought to handle
>> this in its own callback, from an elegance/relevance perspective.
>>
>> So move the invocation of cpufreq_update_policy() to cpufreq_cpu_callback,
>> and place it *after* cpufreq_add_dev().
>>
>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
>> ---
>>
>>  drivers/cpufreq/cpufreq.c       |    1 +
>>  drivers/cpufreq/cpufreq_stats.c |    6 ------
>>  2 files changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index ccc6eab..f8c3100 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -1943,6 +1943,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
>>                 case CPU_ONLINE:
>>                 case CPU_ONLINE_FROZEN:
>>                         cpufreq_add_dev(dev, NULL);
>> +                       cpufreq_update_policy(cpu);
> 
> Do we need to call this for every hotplug of cpu? I am not
> talking about suspend/resume here.
> 

I don't think we need to, but I think it would be better to postpone
optimizations until all the cpufreq regressions get fixed. Later perhaps
we could revisit these minor optimizations if desired.

Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure
  2013-07-12  7:09   ` Viresh Kumar
@ 2013-07-15  6:24     ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15  6:24 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/12/2013 12:39 PM, Viresh Kumar wrote:
> On 12 July 2013 03:46, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> Separate out the allocation of the cpufreq policy structure (along with
>> its error handling) to a helper function. This makes the code easier to
>> read and also helps with some upcoming code reorganization.
>>
>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
>> ---
>>
>>  drivers/cpufreq/cpufreq.c |   50 ++++++++++++++++++++++++++++++++-------------
>>  1 file changed, 35 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index f8c3100..ca14dc2 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -943,6 +943,37 @@ static int cpufreq_add_policy_cpu(unsigned int cpu, unsigned int sibling,
>>  }
>>  #endif
>>
>> +static struct cpufreq_policy *cpufreq_policy_alloc(void)
>> +{
>> +       struct cpufreq_policy *policy;
>> +
>> +       policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL);
> 
> sizeof(*policy) ??

Ah, thanks for pointing that. That must be a remnant from the old code.
But, to make it easier for people testing this patchset to fix their
cpufreq regressions, I'll hold off on posting newer versions of this patchset,
to avoid confusion. We can revisit this at a later point in time, IMHO.

Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-13 13:50   ` Toralf Förster
@ 2013-07-15  6:40     ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15  6:40 UTC (permalink / raw)
  To: Toralf Förster
  Cc: rjw, viresh.kumar, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/13/2013 07:20 PM, Toralf Förster wrote:
> On 07/13/2013 11:23 AM, Toralf Förster wrote:
>> On 07/12/2013 12:15 AM, Srivatsa S. Bhat wrote:
>>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>>> whether their systems work fine after:
>>> a. applying only the first commit (this is what gets backported to stable)
>>
>> applied on top of straight 3.10 .0 : Breaks my system completely -
> 
> overlooked, that the 8 patches are 3.11/3.12 material - but nevertheless :
> 

Let me clarify where to apply these patches:

Assuming that you are using mainline (not -stable) for your testing, this is how
it goes:

For mainline v3.10 (final release, commit 8bb495e3f):

You need to apply 2 patches, in the order mentioned below:
   1. Commit f51e1eb63d (cpufreq: Fix cpufreq regression after suspend/resume)
   2. Patch 1/8 in this patchset. https://lkml.org/lkml/2013/7/11/661
      
Those 2 together, should be able to fix all the cpufreq regression you
originally saw with commit a66b2e (cpufreq: Preserve sysfs files across
suspend/resume).

------

Now, coming to current mainline, ie., 3.10+ (after 3.10, in-between the merge
window), you need to test two different things:

Scenario 1:
    Apply only patch 1/8 in this patchset. https://lkml.org/lkml/2013/7/11/661
    Check if cpufreq behaves fine after suspend/resume.

Scenario 2:
      Apply all the 8 patches in this patchset, and check if cpufreq still
      works fine after suspend/resume.


Important note: 
--------------

This patchset and any of the patches/commits I mentioned above *do* *not* try
to fix any core suspend/resume regression. They only try to fix the *cpufreq*
regression related to suspend/resume, which commit a66b2e (cpufreq: Preserve
sysfs files across suspend/resume) had caused.

In other words, if basic suspend/resume itself is not working even before you
apply any of the patches mentioned above, then something *else* is totally
broken, and we need to address that separately.


> Applied 1/8 on top of v3.10-9289-g9903883 brought same bad picture as
> described for 3.10.0
> 
> And applying patches 1-8 on top of that commit id just gives the same
> pciture - systems hangs during s2ram completly
> 

Please verify whether suspend/resume works fine before applying any of the
patches. That's an important baseline. This patchset tries to fix only the
cpufreq regression, and not all the suspend/resume related problems (which
might have creeped in during the merge window).

> 
>> trying s2ram just blanks the console, lets the power led blinking,
>> neither sys-rq nor anything else worked now, no output to console nor to
>> syslog
>>
>>> b. applying all the commits
>> patch 2#8 doesn't apply at 3.10.0 (neither after patch 1#8 nor directly)
> 
> I attached the .config I'm using for my tests
> (/me wonders if it is worth to notice, that it is a 32bit system booted
> from an external USB drive ?)
> 


Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
                   ` (10 preceding siblings ...)
  2013-07-13  9:23 ` Toralf Förster
@ 2013-07-15  8:27 ` Lan Tianyu
  2013-07-15  8:43   ` Srivatsa S. Bhat
  11 siblings, 1 reply; 53+ messages in thread
From: Lan Tianyu @ 2013-07-15  8:27 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 2013年07月12日 06:15, Srivatsa S. Bhat wrote:
> 
> Hi,
> 
> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
> some subtle regressions in the cpufreq subsystem during suspend/resume.
> This patchset is aimed at rectifying those problems, by fixing the regression
> as well as achieving the original goal of that commit in a proper way.
> 
> Patch 1 reverts the above commit, and is CC'ed to stable.
> 
> Patches 2 - 5 reorganize the code and have no functional impact, and can go
> in as general cleanups as well. This reorganization builds a base that the
> rest of the patches will make use of.
> 
> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
> across suspend/resume.
> 
> All the patches apply on current mainline.
> 
> 
> Robert, Durgadoss, it would be great if you could try it out and see if it works
> well for your usecase. I tested it locally and cpufreq related files did retain
> their permissions across suspend/resume. Let me know if it works fine in your
> setup too.
> 
> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
> whether their systems work fine after:
> a. applying only the first commit (this is what gets backported to stable)
> b. applying all the commits

Hi, I tested this patchset on my machine and the issue in bug 59781 has
been resolved.

Tested-by: Tianyu Lan <tianyu.lan@intel.com>


> 
> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
> testing this patchset. Though that patch also touches cpufreq subsystem, it
> doesn't affect this patchset in any way and there is absolutely no dependency
> between the two in terms of code. That fix just makes basic CPU hotplug work
> without locking up on current mainline).
> 
> [1]. https://lkml.org/lkml/2013/7/10/611
> 
> 
> Thank you very much!
> 
> 
>  Srivatsa S. Bhat (8):
>       cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume
>       cpufreq: Fix misplaced call to cpufreq_update_policy()
>       cpufreq: Add helper to perform alloc/free of policy structure
>       cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface
>       cpufreq: Extract the handover of policy cpu to a helper function
>       cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown
>       cpufreq: Preserve policy structure across suspend/resume
>       cpufreq: Perform light-weight init/teardown during suspend/resume
> 
>  drivers/cpufreq/cpufreq.c       |  297 ++++++++++++++++++++++++++-------------
>  drivers/cpufreq/cpufreq_stats.c |   10 -
>  2 files changed, 199 insertions(+), 108 deletions(-)
> 
> 
> Thanks,
> Srivatsa S. Bhat
> IBM Linux Technology Center
> 


-- 
Best regards
Tianyu Lan

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-15  8:27 ` Lan Tianyu
@ 2013-07-15  8:43   ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15  8:43 UTC (permalink / raw)
  To: Lan Tianyu
  Cc: rjw, viresh.kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/15/2013 01:57 PM, Lan Tianyu wrote:
> On 2013年07月12日 06:15, Srivatsa S. Bhat wrote:
>>
>> Hi,
>>
>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
>> some subtle regressions in the cpufreq subsystem during suspend/resume.
>> This patchset is aimed at rectifying those problems, by fixing the regression
>> as well as achieving the original goal of that commit in a proper way.
>>
>> Patch 1 reverts the above commit, and is CC'ed to stable.
>>
>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
>> in as general cleanups as well. This reorganization builds a base that the
>> rest of the patches will make use of.
>>
>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
>> across suspend/resume.
>>
>> All the patches apply on current mainline.
>>
>>
>> Robert, Durgadoss, it would be great if you could try it out and see if it works
>> well for your usecase. I tested it locally and cpufreq related files did retain
>> their permissions across suspend/resume. Let me know if it works fine in your
>> setup too.
>>
>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>> whether their systems work fine after:
>> a. applying only the first commit (this is what gets backported to stable)
>> b. applying all the commits
> 
> Hi, I tested this patchset on my machine and the issue in bug 59781 has
> been resolved.
> 
> Tested-by: Tianyu Lan <tianyu.lan@intel.com>
> 

Awesome! Thanks a lot!

Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-11 22:17 ` [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume Srivatsa S. Bhat
@ 2013-07-15  9:55   ` Viresh Kumar
  2013-07-15 10:05     ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-15  9:55 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

Hi Srivatsa,

I may be wrong but it looks something is wrong in this patch.

On 12 July 2013 03:47, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c

> @@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device *dev,
>         if ((cpus == 1) && (cpufreq_driver->target))
>                 __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
>
> -       pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
> -       cpufreq_cpu_put(data);
> +       if (!frozen) {
> +               pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
> +               cpufreq_cpu_put(data);

So, we don't decrement usage count here. But we are still increasing
counts on cpufreq_add_dev after resume, isn't it?

So, we wouldn't be able to free policy struct once all the cpus of a
policy are removed after suspend/resume has happened once.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-15  9:55   ` Viresh Kumar
@ 2013-07-15 10:05     ` Srivatsa S. Bhat
  2013-07-15 10:21       ` Viresh Kumar
                         ` (2 more replies)
  0 siblings, 3 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15 10:05 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/15/2013 03:25 PM, Viresh Kumar wrote:
> Hi Srivatsa,
> 
> I may be wrong but it looks something is wrong in this patch.
> 
> On 12 July 2013 03:47, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> 
>> @@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device *dev,
>>         if ((cpus == 1) && (cpufreq_driver->target))
>>                 __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
>>
>> -       pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
>> -       cpufreq_cpu_put(data);
>> +       if (!frozen) {
>> +               pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
>> +               cpufreq_cpu_put(data);
> 
> So, we don't decrement usage count here. But we are still increasing
> counts on cpufreq_add_dev after resume, isn't it?
> 
> So, we wouldn't be able to free policy struct once all the cpus of a
> policy are removed after suspend/resume has happened once.
> 

Actually even I was wondering about this while writing the patch and
I even tested shutdown after multiple suspend/resume cycles, to verify that
the refcount is messed up. But surprisingly, things worked just fine.

Logically there should've been a refcount mismatch and things should have
failed, but everything worked fine during my tests. Apart from suspend/resume
and shutdown tests, I even tried mixing a few regular CPU hotplug operations
(echo 0/1 to sysfs online files), but nothing stood out.

Sorry, I forgot to document this in the patch. Either the patch is wrong
or something else is silently fixing this up. Not sure what is the exact
situation.

Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-15 10:05     ` Srivatsa S. Bhat
@ 2013-07-15 10:21       ` Viresh Kumar
  2013-07-15 11:52         ` Srivatsa S. Bhat
  2013-07-15 11:35       ` Rafael J. Wysocki
  2013-07-16  6:15       ` Viresh Kumar
  2 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-15 10:21 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 15 July 2013 15:35, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> Actually even I was wondering about this while writing the patch and
> I even tested shutdown after multiple suspend/resume cycles, to verify that
> the refcount is messed up. But surprisingly, things worked just fine.

What kind of system have you tested it on?

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-15 10:05     ` Srivatsa S. Bhat
  2013-07-15 10:21       ` Viresh Kumar
@ 2013-07-15 11:35       ` Rafael J. Wysocki
  2013-07-15 11:53         ` Srivatsa S. Bhat
  2013-07-16  6:15       ` Viresh Kumar
  2 siblings, 1 reply; 53+ messages in thread
From: Rafael J. Wysocki @ 2013-07-15 11:35 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: Viresh Kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Monday, July 15, 2013 03:35:04 PM Srivatsa S. Bhat wrote:
> On 07/15/2013 03:25 PM, Viresh Kumar wrote:
> > Hi Srivatsa,
> > 
> > I may be wrong but it looks something is wrong in this patch.
> > 
> > On 12 July 2013 03:47, Srivatsa S. Bhat
> > <srivatsa.bhat@linux.vnet.ibm.com> wrote:
> >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > 
> >> @@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device *dev,
> >>         if ((cpus == 1) && (cpufreq_driver->target))
> >>                 __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
> >>
> >> -       pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
> >> -       cpufreq_cpu_put(data);
> >> +       if (!frozen) {
> >> +               pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
> >> +               cpufreq_cpu_put(data);
> > 
> > So, we don't decrement usage count here. But we are still increasing
> > counts on cpufreq_add_dev after resume, isn't it?
> > 
> > So, we wouldn't be able to free policy struct once all the cpus of a
> > policy are removed after suspend/resume has happened once.
> > 
> 
> Actually even I was wondering about this while writing the patch and
> I even tested shutdown after multiple suspend/resume cycles, to verify that
> the refcount is messed up. But surprisingly, things worked just fine.
> 
> Logically there should've been a refcount mismatch and things should have
> failed, but everything worked fine during my tests. Apart from suspend/resume
> and shutdown tests, I even tried mixing a few regular CPU hotplug operations
> (echo 0/1 to sysfs online files), but nothing stood out.
> 
> Sorry, I forgot to document this in the patch. Either the patch is wrong
> or something else is silently fixing this up. Not sure what is the exact
> situation.

OK, so I'm not going to queue [2-8/8] up until we find out what's going on
here (and until Toralf tells me that it doesn't break his system any more).

I've queued up [1/8] for 3.11 already.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy()
  2013-07-15  6:20     ` Srivatsa S. Bhat
@ 2013-07-15 11:37       ` Rafael J. Wysocki
  0 siblings, 0 replies; 53+ messages in thread
From: Rafael J. Wysocki @ 2013-07-15 11:37 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: Viresh Kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Monday, July 15, 2013 11:50:24 AM Srivatsa S. Bhat wrote:
> On 07/12/2013 12:36 PM, Viresh Kumar wrote:
> > On 12 July 2013 03:45, Srivatsa S. Bhat
> > <srivatsa.bhat@linux.vnet.ibm.com> wrote:
> >> The call to cpufreq_update_policy() is placed in the CPU hotplug callback
> >> of cpufreq_stats, which has a higher priority than the CPU hotplug callback
> >> of cpufreq-core. As a result, during CPU_ONLINE/CPU_ONLINE_FROZEN, we end up
> >> calling cpufreq_update_policy() *before* calling cpufreq_add_dev() !
> >> And for uninitialized CPUs, it just returns silently, not doing anything.
> > 
> > Hmm..
> > 
> >> To add to it, cpufreq_stats is not even the right place to call
> >> cpufreq_update_policy() to begin with. The cpufreq core ought to handle
> >> this in its own callback, from an elegance/relevance perspective.
> >>
> >> So move the invocation of cpufreq_update_policy() to cpufreq_cpu_callback,
> >> and place it *after* cpufreq_add_dev().
> >>
> >> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> >> ---
> >>
> >>  drivers/cpufreq/cpufreq.c       |    1 +
> >>  drivers/cpufreq/cpufreq_stats.c |    6 ------
> >>  2 files changed, 1 insertion(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> >> index ccc6eab..f8c3100 100644
> >> --- a/drivers/cpufreq/cpufreq.c
> >> +++ b/drivers/cpufreq/cpufreq.c
> >> @@ -1943,6 +1943,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
> >>                 case CPU_ONLINE:
> >>                 case CPU_ONLINE_FROZEN:
> >>                         cpufreq_add_dev(dev, NULL);
> >> +                       cpufreq_update_policy(cpu);
> > 
> > Do we need to call this for every hotplug of cpu? I am not
> > talking about suspend/resume here.
> > 
> 
> I don't think we need to, but I think it would be better to postpone
> optimizations until all the cpufreq regressions get fixed. Later perhaps
> we could revisit these minor optimizations if desired.

Agreed.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-15 10:21       ` Viresh Kumar
@ 2013-07-15 11:52         ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15 11:52 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/15/2013 03:51 PM, Viresh Kumar wrote:
> On 15 July 2013 15:35, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> Actually even I was wondering about this while writing the patch and
>> I even tested shutdown after multiple suspend/resume cycles, to verify that
>> the refcount is messed up. But surprisingly, things worked just fine.
> 
> What kind of system have you tested it on?
> 

The system has 2 sockets with 8 cores each, and has Intel Sandybridge
CPUs. I had used a local patch to simulate CPU hotplug in the suspend-to-ram
path using the freeze state of pm_test (because I had other problems in
using the 'processors' state of pm_test). The patch is shown below:


diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index ece0422..fe07b77 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -342,8 +342,13 @@ static int enter_state(suspend_state_t state)
 	if (error)
 		goto Unlock;
 
-	if (suspend_test(TEST_FREEZER))
+	if (suspend_test(TEST_FREEZER)) {
+		pr_debug("Disabling nonboot CPUs\n");
+		disable_nonboot_cpus();
+		pr_debug("Enabling nonboot CPUs\n");
+		enable_nonboot_cpus();
 		goto Finish;
+	}
 
 	pr_debug("PM: Entering %s sleep\n", pm_states[state]);
 	pm_restrict_gfp_mask();


 
Regards,
Srivatsa S. Bhat


^ permalink raw reply related	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-15 11:35       ` Rafael J. Wysocki
@ 2013-07-15 11:53         ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-15 11:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Viresh Kumar, toralf.foerster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/15/2013 05:05 PM, Rafael J. Wysocki wrote:
> On Monday, July 15, 2013 03:35:04 PM Srivatsa S. Bhat wrote:
>> On 07/15/2013 03:25 PM, Viresh Kumar wrote:
>>> Hi Srivatsa,
>>>
>>> I may be wrong but it looks something is wrong in this patch.
>>>
>>> On 12 July 2013 03:47, Srivatsa S. Bhat
>>> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>>>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>>>
>>>> @@ -1239,29 +1263,40 @@ static int __cpufreq_remove_dev(struct device *dev,
>>>>         if ((cpus == 1) && (cpufreq_driver->target))
>>>>                 __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT);
>>>>
>>>> -       pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
>>>> -       cpufreq_cpu_put(data);
>>>> +       if (!frozen) {
>>>> +               pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
>>>> +               cpufreq_cpu_put(data);
>>>
>>> So, we don't decrement usage count here. But we are still increasing
>>> counts on cpufreq_add_dev after resume, isn't it?
>>>
>>> So, we wouldn't be able to free policy struct once all the cpus of a
>>> policy are removed after suspend/resume has happened once.
>>>
>>
>> Actually even I was wondering about this while writing the patch and
>> I even tested shutdown after multiple suspend/resume cycles, to verify that
>> the refcount is messed up. But surprisingly, things worked just fine.
>>
>> Logically there should've been a refcount mismatch and things should have
>> failed, but everything worked fine during my tests. Apart from suspend/resume
>> and shutdown tests, I even tried mixing a few regular CPU hotplug operations
>> (echo 0/1 to sysfs online files), but nothing stood out.
>>
>> Sorry, I forgot to document this in the patch. Either the patch is wrong
>> or something else is silently fixing this up. Not sure what is the exact
>> situation.
> 
> OK, so I'm not going to queue [2-8/8] up until we find out what's going on
> here (and until Toralf tells me that it doesn't break his system any more).
> 

Ok, that sounds good.

> I've queued up [1/8] for 3.11 already.
> 

Thank you!
 
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:33 ` Rafael J. Wysocki
  2013-07-11 22:23   ` Srivatsa S. Bhat
@ 2013-07-15 17:38   ` Toralf Förster
  2013-07-15 23:25     ` Rafael J. Wysocki
  1 sibling, 1 reply; 53+ messages in thread
From: Toralf Förster @ 2013-07-15 17:38 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Srivatsa S. Bhat, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

On 07/12/2013 12:33 AM, Rafael J. Wysocki wrote:
> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
> hate them.  This way we'll have some more testing coverage before they reach
> the mainline hopefully.

Applied patch 1#8 on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
cycles fine and crashed the system at the 3rd attempt / one times just
at the 4th (blinking power led, no sysrq, ...).

Applying patch 1-8 on top of that tree differs in that way that it
crashes now the system even at the 1st attempt or at least at the 2nd

My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
Gentoo Linux - FWIW .config attached.


-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

[-- Attachment #2: .config --]
[-- Type: text/plain, Size: 66393 bytes --]

#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.11.0-rc1 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CPU_AUTOPROBE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
# CONFIG_ZONE_DMA32 is not set
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_32_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
CONFIG_ARCH_CPU_PROBE_RELEASE=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION="-test"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
CONFIG_KERNEL_XZ=y
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_FHANDLE=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y
# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_IRQ_TIME_ACCOUNTING is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_FANOUT=32
CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_RCU_NOCB_CPU is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_MEMCG=y
# CONFIG_MEMCG_SWAP is not set
# CONFIG_MEMCG_KMEM is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
# CONFIG_CHECKPOINT_RESTORE is not set
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
# CONFIG_USER_NS is not set
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_UIDGID_CONVERTED=y
# CONFIG_UIDGID_STRICT_TYPE_CHECKS is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_MM_OWNER=y
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
CONFIG_RD_LZ4=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
# CONFIG_EXPERT is not set
CONFIG_UID16=y
# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_PCI_QUIRKS=y
# CONFIG_EMBEDDED is not set
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not set
CONFIG_SLUB=y
CONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_PROFILING is not set
CONFIG_TRACEPOINTS=y
CONFIG_HAVE_OPROFILE=y
CONFIG_OPROFILE_NMI_TIMER=y
# CONFIG_KPROBES is not set
CONFIG_JUMP_LABEL=y
# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_PERF_EVENTS_NMI=y
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_HAVE_CMPXCHG_LOCAL=y
CONFIG_HAVE_CMPXCHG_DOUBLE=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP_FILTER=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_CLONE_BACKWARDS=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_OLD_SIGACTION=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
CONFIG_BLK_DEV_BSG=y
# CONFIG_BLK_DEV_BSGLIB is not set
# CONFIG_BLK_DEV_INTEGRITY is not set
# CONFIG_BLK_DEV_THROTTLING is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_DEADLINE is not set
CONFIG_IOSCHED_CFQ=y
# CONFIG_CFQ_GROUP_IOSCHED is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
CONFIG_INLINE_READ_UNLOCK=y
CONFIG_INLINE_READ_UNLOCK_IRQ=y
CONFIG_INLINE_WRITE_UNLOCK=y
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_ZONE_DMA=y
CONFIG_SMP=y
# CONFIG_X86_MPPARSE is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_EXTENDED_PLATFORM is not set
# CONFIG_X86_INTEL_LPSS is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_X86_32_IRIS is not set
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_HYPERVISOR_GUEST is not set
CONFIG_NO_BOOTMEM=y
# CONFIG_MEMTEST is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MELAN is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
CONFIG_MCORE2=y
# CONFIG_MATOM is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=5
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
CONFIG_NR_CPUS=8
# CONFIG_SCHED_SMT is not set
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
# CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
# CONFIG_X86_MCE_AMD is not set
# CONFIG_X86_ANCIENT_MCE is not set
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
CONFIG_MICROCODE=m
CONFIG_MICROCODE_INTEL=y
# CONFIG_MICROCODE_AMD is not set
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_MICROCODE_INTEL_LIB=y
# CONFIG_MICROCODE_INTEL_EARLY is not set
# CONFIG_MICROCODE_AMD_EARLY is not set
CONFIG_X86_MSR=y
# CONFIG_X86_CPUID is not set
# CONFIG_NOHIGHMEM is not set
# CONFIG_HIGHMEM4G is not set
CONFIG_HIGHMEM64G=y
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
CONFIG_X86_PAE=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ILLEGAL_POINTER_VALUE=0
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
CONFIG_ARCH_DISCARD_MEMBLOCK=y
# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_COMPACTION=y
CONFIG_MIGRATION=y
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_MEMORY_FAILURE is not set
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_CLEANCACHE=y
# CONFIG_FRONTSWAP is not set
# CONFIG_ZBUD is not set
# CONFIG_HIGHPTE is not set
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW=64
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
CONFIG_ARCH_USES_PG_UNCACHED=y
CONFIG_ARCH_RANDOM=y
CONFIG_X86_SMAP=y
# CONFIG_EFI is not set
CONFIG_SECCOMP=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_SCHED_HRTICK=y
# CONFIG_KEXEC is not set
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
# CONFIG_COMPAT_VDSO is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

#
# Power management and ACPI options
#
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="/dev/sdb2"
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not set
CONFIG_PM_RUNTIME=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_SLEEP_DEBUG=y
# CONFIG_PM_TRACE_RTC is not set
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_PROCFS_POWER is not set
# CONFIG_ACPI_EC_DEBUGFS is not set
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
# CONFIG_ACPI_FAN is not set
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_I2C=m
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_SBS is not set
# CONFIG_ACPI_HED is not set
# CONFIG_ACPI_CUSTOM_METHOD is not set
CONFIG_ACPI_APEI=y
# CONFIG_ACPI_APEI_GHES is not set
# CONFIG_ACPI_APEI_PCIEAER is not set
# CONFIG_ACPI_APEI_EINJ is not set
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
# CONFIG_SFI is not set
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=m
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set

#
# x86 CPU frequency scaling drivers
#
# CONFIG_X86_INTEL_PSTATE is not set
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set
# CONFIG_X86_E_POWERSAVER is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
CONFIG_INTEL_IDLE=y

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
# CONFIG_PCIE_ECRC is not set
# CONFIG_PCIEAER_INJECT is not set
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_PCIE_PME=y
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
# CONFIG_PCI_STUB is not set
CONFIG_HT_IRQ=y
# CONFIG_PCI_IOV is not set
# CONFIG_PCI_PRI is not set
# CONFIG_PCI_PASID is not set
CONFIG_PCI_IOAPIC=y
CONFIG_PCI_LABEL=y

#
# PCI host controller drivers
#
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_SCx200 is not set
# CONFIG_ALIX is not set
# CONFIG_NET5501 is not set
# CONFIG_GEOS is not set
CONFIG_AMD_NB=y
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set
# CONFIG_RAPIDIO is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_SCRIPT=y
CONFIG_HAVE_AOUT=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set
CONFIG_COREDUMP=y
CONFIG_HAVE_ATOMIC_IOMAP=y
CONFIG_HAVE_TEXT_POKE_SMP=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=m
# CONFIG_PACKET_DIAG is not set
CONFIG_UNIX=y
# CONFIG_UNIX_DIAG is not set
# CONFIG_XFRM_USER is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
# CONFIG_NET_IP_TUNNEL is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
# CONFIG_BRIDGE is not set
CONFIG_HAVE_NET_DSA=y
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set
# CONFIG_DNS_RESOLVER is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
# CONFIG_VSOCKETS is not set
# CONFIG_NETLINK_MMAP is not set
# CONFIG_NETLINK_DIAG is not set
# CONFIG_NET_MPLS_GSO is not set
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_XPS=y
# CONFIG_NETPRIO_CGROUP is not set
CONFIG_NET_LL_RX_POLL=y
CONFIG_BQL=y
CONFIG_NET_FLOW_LIMIT=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_DROP_MONITOR is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_CMA is not set

#
# Bus devices
#
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
CONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_NVME is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_RAM is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_RSXX is not set

#
# Misc devices
#
# CONFIG_SENSORS_LIS3LV02D is not set
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ATMEL_SSC is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1780 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_BMP085_I2C is not set
# CONFIG_PCH_PHUB is not set
# CONFIG_USB_SWITCH_FSA9480 is not set
# CONFIG_SRAM is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_CB710_CORE is not set

#
# Texas Instruments shared transport line discipline
#
# CONFIG_SENSORS_LIS3_I2C is not set

#
# Altera FPGA firmware download module
#
# CONFIG_ALTERA_STAPL is not set
# CONFIG_VMWARE_VMCI is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not set
# CONFIG_SATA_PMP is not set

#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
# CONFIG_ATA_SFF is not set
CONFIG_MD=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BCACHE is not set
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
CONFIG_DM_CRYPT=m
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_THIN_PROVISIONING is not set
# CONFIG_DM_CACHE is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_RAID is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
CONFIG_DM_UEVENT=y
# CONFIG_DM_FLAKEY is not set
# CONFIG_DM_VERITY is not set
# CONFIG_DM_SWITCH is not set
# CONFIG_TARGET_CORE is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_FIREWIRE_NOSY is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
# CONFIG_BONDING is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_FC is not set
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
# CONFIG_VXLAN is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_NLMON is not set
# CONFIG_ARCNET is not set

#
# CAIF transport drivers
#

#
# Distributed Switch Architecture drivers
#
# CONFIG_NET_DSA_MV88E6XXX is not set
# CONFIG_NET_DSA_MV88E6060 is not set
# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set
# CONFIG_NET_DSA_MV88E6131 is not set
# CONFIG_NET_DSA_MV88E6123_61_65 is not set
CONFIG_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_ALTEON is not set
# CONFIG_NET_VENDOR_AMD is not set
CONFIG_NET_VENDOR_ARC=y
# CONFIG_NET_VENDOR_ATHEROS is not set
# CONFIG_NET_CADENCE is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_BROCADE is not set
# CONFIG_NET_CALXEDA_XGMAC is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CISCO is not set
# CONFIG_DNET is not set
# CONFIG_NET_VENDOR_DEC is not set
# CONFIG_NET_VENDOR_DLINK is not set
# CONFIG_NET_VENDOR_EMULEX is not set
# CONFIG_NET_VENDOR_EXAR is not set
# CONFIG_NET_VENDOR_HP is not set
CONFIG_NET_VENDOR_INTEL=y
# CONFIG_E100 is not set
# CONFIG_E1000 is not set
CONFIG_E1000E=m
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_IXGB is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
# CONFIG_NET_VENDOR_I825XX is not set
# CONFIG_IP1000 is not set
# CONFIG_JME is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MELLANOX is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_FEALNX is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_ETHOC is not set
# CONFIG_NET_PACKET_ENGINE is not set
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_REALTEK is not set
# CONFIG_SH_ETH is not set
# CONFIG_NET_VENDOR_RDC is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_SFC is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
# CONFIG_NET_VENDOR_VIA is not set
CONFIG_NET_VENDOR_WIZNET=y
# CONFIG_WIZNET_W5100 is not set
# CONFIG_WIZNET_W5300 is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_PHYLIB is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_RTL8152 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_IPHETH is not set
# CONFIG_WLAN is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
# CONFIG_ISDN is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
CONFIG_INPUT_POLLDEV=m
# CONFIG_INPUT_SPARSEKMAP is not set
# CONFIG_INPUT_MATRIXKMAP is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1440
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=900
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MCS is not set
# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_CYPRESS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_CYAPA is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_MOUSE_SYNAPTICS_USB is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_UNIX98_PTYS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
# CONFIG_LEGACY_PTYS is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set
# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
CONFIG_DEVKMEM=y

#
# Serial drivers
#
CONFIG_SERIAL_8250=m
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=m
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_DW is not set

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_MFD_HSU is not set
CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_PCH_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
CONFIG_NVRAM=m
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_RAW_DRIVER is not set
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_TCG_TPM=m
CONFIG_TCG_TIS=m
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_INFINEON is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_COMPAT is not set
# CONFIG_I2C_CHARDEV is not set
# CONFIG_I2C_MUX is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
CONFIG_I2C_I801=m
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_ISMT is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# ACPI drivers
#
# CONFIG_I2C_SCMI is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EG20T is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_PXA_PCI is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_DIOLAN_U2C is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_SPI is not set
# CONFIG_HSI is not set

#
# PPS support
#
CONFIG_PPS=m
# CONFIG_PPS_DEBUG is not set

#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_GPIO is not set

#
# PPS generators support
#

#
# PTP clock support
#
CONFIG_PTP_1588_CLOCK=m

#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
#
# CONFIG_PTP_1588_CLOCK_PCH is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_GPIO_DEVRES=y
# CONFIG_GPIOLIB is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_SBS is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_POWER_RESET is not set
# CONFIG_POWER_AVS is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7410 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_FAM15H_POWER is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_HIH6130 is not set
CONFIG_SENSORS_CORETEMP=m
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_LM95234 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set
# CONFIG_SENSORS_MAX16065 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX1668 is not set
# CONFIG_SENSORS_MAX197 is not set
# CONFIG_SENSORS_MAX6639 is not set
# CONFIG_SENSORS_MAX6642 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_MAX6697 is not set
# CONFIG_SENSORS_MCP3021 is not set
# CONFIG_SENSORS_NCT6775 is not set
# CONFIG_SENSORS_NTC_THERMISTOR is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_EMC6W201 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_SCH56XX_COMMON is not set
# CONFIG_SENSORS_ADS1015 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_INA209 is not set
# CONFIG_SENSORS_INA2XX is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_APPLESMC is not set

#
# ACPI drivers
#
# CONFIG_SENSORS_ACPI_POWER is not set
# CONFIG_SENSORS_ATK0110 is not set
CONFIG_THERMAL=m
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_CPU_THERMAL is not set
# CONFIG_THERMAL_EMULATION is not set
# CONFIG_INTEL_POWERCLAMP is not set
CONFIG_X86_PKG_TEMP_THERMAL=m

#
# Texas Instruments thermal drivers
#
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set
CONFIG_BCMA_POSSIBLE=y

#
# Broadcom specific AMBA
#
# CONFIG_BCMA is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_CS5535 is not set
# CONFIG_MFD_CROS_EC is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_LPC_ICH is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RTSX_PCI is not set
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65217 is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set

#
# Graphics support
#
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=2
# CONFIG_VGA_SWITCHEROO is not set
CONFIG_DRM=m
CONFIG_DRM_KMS_HELPER=m
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set

#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I810 is not set
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_HDMI=y
CONFIG_FB=m
CONFIG_FIRMWARE_EDID=y
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=m
CONFIG_FB_CFB_COPYAREA=m
CONFIG_FB_CFB_IMAGEBLIT=m
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
# CONFIG_FB_MODE_HELPERS is not set
# CONFIG_FB_TILEBLITTING is not set

#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_I810 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_GOLDFISH is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
# CONFIG_FB_AUO_K190X is not set
# CONFIG_EXYNOS_VIDEO is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3630 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LP855X is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=m
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_LOGO is not set
# CONFIG_SOUND is not set

#
# HID support
#
CONFIG_HID=m
# CONFIG_HIDRAW is not set
# CONFIG_UHID is not set
CONFIG_HID_GENERIC=m

#
# Special HID drivers
#
CONFIG_HID_A4TECH=m
# CONFIG_HID_ACRUX is not set
CONFIG_HID_APPLE=m
# CONFIG_HID_APPLEIR is not set
# CONFIG_HID_AUREAL is not set
CONFIG_HID_BELKIN=m
CONFIG_HID_CHERRY=m
CONFIG_HID_CHICONY=m
CONFIG_HID_CYPRESS=m
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_ELO is not set
CONFIG_HID_EZKEY=m
# CONFIG_HID_HOLTEK is not set
# CONFIG_HID_HUION is not set
# CONFIG_HID_KEYTOUCH is not set
CONFIG_HID_KYE=m
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_ICADE is not set
# CONFIG_HID_TWINHAN is not set
CONFIG_HID_KENSINGTON=m
# CONFIG_HID_LCPOWER is not set
# CONFIG_HID_LENOVO_TPKBD is not set
CONFIG_HID_LOGITECH=m
CONFIG_HID_LOGITECH_DJ=m
# CONFIG_LOGITECH_FF is not set
# CONFIG_LOGIRUMBLEPAD2_FF is not set
# CONFIG_LOGIG940_FF is not set
# CONFIG_LOGIWHEELS_FF is not set
# CONFIG_HID_MAGICMOUSE is not set
CONFIG_HID_MICROSOFT=m
CONFIG_HID_MONTEREY=m
# CONFIG_HID_MULTITOUCH is not set
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_PRIMAX is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_SAITEK is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_STEELSERIES is not set
# CONFIG_HID_SUNPLUS is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THINGM is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_WACOM is not set
# CONFIG_HID_WIIMOTE is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
# CONFIG_HID_SENSOR_HUB is not set

#
# USB HID support
#
CONFIG_USB_HID=m
# CONFIG_HID_PID is not set
# CONFIG_USB_HIDDEV is not set

#
# I2C HID support
#
# CONFIG_I2C_HID is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_OTG is not set
# CONFIG_USB_MON is not set
# CONFIG_USB_WUSB_CBAF is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_XHCI_HCD is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=y
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_ISP1362_HCD is not set
# CONFIG_USB_FUSBH200_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set

#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_DWC3 is not set
# CONFIG_USB_CHIPIDEA is not set

#
# USB port drivers
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_EZUSB_FX2 is not set
# CONFIG_USB_HSIC_USB3503 is not set
# CONFIG_USB_PHY is not set
# CONFIG_USB_GADGET is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not set
# CONFIG_LEDS_LP5562 is not set
# CONFIG_LEDS_CLEVO_MAIL is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_PCA9633 is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_INTEL_SS4200 is not set
# CONFIG_LEDS_DELL_NETBOOKS is not set
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_LM355x is not set
# CONFIG_LEDS_OT200 is not set
# CONFIG_LEDS_BLINKM is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEDS_TRIGGER_ONESHOT is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_CPU is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set

#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_LEDS_TRIGGER_TRANSIENT is not set
# CONFIG_LEDS_TRIGGER_CAMERA is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set

#
# SPI RTC drivers
#

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
# CONFIG_RTC_DRV_DS2404 is not set

#
# on-CPU RTC drivers
#

#
# HID Sensor RTC drivers
#
# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
# CONFIG_VFIO is not set
# CONFIG_VIRT_DRIVERS is not set

#
# Virtio drivers
#
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set

#
# Microsoft Hyper-V guest support
#
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACER_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_CHROMEOS_LAPTOP is not set
# CONFIG_DELL_WMI is not set
# CONFIG_DELL_WMI_AIO is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_TC1100_WMI is not set
# CONFIG_HP_ACCEL is not set
# CONFIG_HP_WMI is not set
# CONFIG_PANASONIC_LAPTOP is not set
CONFIG_THINKPAD_ACPI=m
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
# CONFIG_THINKPAD_ACPI_DEBUG is not set
# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
# CONFIG_THINKPAD_ACPI_VIDEO is not set
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_INTEL_MENLOW is not set
CONFIG_ACPI_WMI=m
# CONFIG_MSI_WMI is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_INTEL_IPS is not set
# CONFIG_IBM_RTL is not set
# CONFIG_XO15_EBOOK is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_MXM_WMI is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_APPLE_GMUX is not set
# CONFIG_INTEL_RST is not set
# CONFIG_INTEL_SMARTCONNECT is not set
# CONFIG_PVPANIC is not set

#
# Hardware Spinlock drivers
#
CONFIG_CLKSRC_I8253=y
CONFIG_CLKEVT_I8253=y
CONFIG_I8253_LOCK=y
CONFIG_CLKBLD_I8253=y
# CONFIG_MAILBOX is not set
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
CONFIG_DMAR_TABLE=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y

#
# Remoteproc drivers
#
# CONFIG_STE_MODEM_RPROC is not set

#
# Rpmsg drivers
#
# CONFIG_PM_DEVFREQ is not set
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_VME_BUS is not set
# CONFIG_PWM is not set
# CONFIG_IPACK_BUS is not set
# CONFIG_RESET_CONTROLLER is not set
# CONFIG_FMC is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
# CONFIG_ISCSI_IBFT_FIND is not set
# CONFIG_GOOGLE_FIRMWARE is not set

#
# File systems
#
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
# CONFIG_EXT2_FS_XIP is not set
# CONFIG_EXT3_FS is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=y
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_FANOTIFY is not set
# CONFIG_QUOTA is not set
# CONFIG_QUOTACTL is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set
CONFIG_GENERIC_ACL=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_LOGFS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_FTRACE is not set
# CONFIG_PSTORE_RAM is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
# CONFIG_F2FS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=m
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_MAC_ROMAN is not set
# CONFIG_NLS_MAC_CELTIC is not set
# CONFIG_NLS_MAC_CENTEURO is not set
# CONFIG_NLS_MAC_CROATIAN is not set
# CONFIG_NLS_MAC_CYRILLIC is not set
# CONFIG_NLS_MAC_GAELIC is not set
# CONFIG_NLS_MAC_GREEK is not set
# CONFIG_NLS_MAC_ICELAND is not set
# CONFIG_NLS_MAC_INUIT is not set
# CONFIG_NLS_MAC_ROMANIAN is not set
# CONFIG_NLS_MAC_TURKISH is not set
CONFIG_NLS_UTF8=m

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y

#
# printk and dmesg options
#
# CONFIG_PRINTK_TIME is not set
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_DYNAMIC_DEBUG is not set

#
# Compile-time checks and compiler options
#
# CONFIG_DEBUG_INFO is not set
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_FRAME_WARN=1024
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y

#
# Memory Debugging
#
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
CONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_DEBUG_HIGHMEM is not set
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_DEBUG_SHIRQ is not set

#
# Debug Lockups and Hangs
#
# CONFIG_LOCKUP_DETECTOR is not set
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
# CONFIG_PANIC_ON_OOPS is not set
CONFIG_PANIC_ON_OOPS_VALUE=0
# CONFIG_SCHED_DEBUG is not set
# CONFIG_SCHEDSTATS is not set
CONFIG_TIMER_STATS=y

#
# Lock Debugging (spinlocks, mutexes, etc...)
#
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set

#
# RCU Debugging
#
# CONFIG_SPARSE_RCU_POINTER is not set
# CONFIG_RCU_TORTURE_TEST is not set
CONFIG_RCU_CPU_STALL_TIMEOUT=60
# CONFIG_RCU_CPU_STALL_INFO is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACE_CLOCK=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_FTRACE_SYSCALLS is not set
# CONFIG_TRACER_SNAPSHOT is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
# CONFIG_STACK_TRACER is not set
CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_UPROBE_EVENT is not set
# CONFIG_PROBE_EVENTS is not set
CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
# CONFIG_FUNCTION_PROFILER is not set
CONFIG_FTRACE_MCOUNT_RECORD=y
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_MMIOTRACE is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set

#
# Runtime Testing
#
# CONFIG_LKDTM is not set
# CONFIG_TEST_LIST_SORT is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_TEST_STRING_HELPERS is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_STRICT_DEVMEM=y
# CONFIG_X86_VERBOSE_BOOTUP is not set
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_X86_PTDUMP is not set
CONFIG_DEBUG_RODATA=y
# CONFIG_DEBUG_RODATA_TEST is not set
CONFIG_DEBUG_SET_MODULE_RONX=y
# CONFIG_DEBUG_NX_TEST is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_DEBUG_TLBFLUSH is not set
# CONFIG_IOMMU_STRESS is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set
CONFIG_OPTIMIZE_INLINING=y
# CONFIG_DEBUG_NMI_SELFTEST is not set
# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set

#
# Security options
#
CONFIG_KEYS=y
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
CONFIG_SECURITY_DMESG_RESTRICT=y
# CONFIG_SECURITY is not set
CONFIG_SECURITYFS=y
# CONFIG_INTEL_TXT is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_USER is not set
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
CONFIG_CRYPTO_CBC=m
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
# CONFIG_CRYPTO_CMAC is not set
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_CRC32 is not set
# CONFIG_CRYPTO_CRC32_PCLMUL is not set
# CONFIG_CRYPTO_CRCT10DIF is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_586=m
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_ANUBIS is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_USER_API_HASH is not set
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
# CONFIG_CRYPTO_HW is not set
# CONFIG_ASYMMETRIC_KEY_TYPE is not set
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_NET_UTILS=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_IO=y
# CONFIG_CRC_CCITT is not set
CONFIG_CRC16=y
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
# CONFIG_CRC32_SELFTEST is not set
CONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_SLICEBY4 is not set
# CONFIG_CRC32_SARWATE is not set
# CONFIG_CRC32_BIT is not set
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y
# CONFIG_CRC8 is not set
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_LZ4_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_CHECK_SIGNATURE=y
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_NLATTR=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_AVERAGE=y
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set
CONFIG_FONT_SUPPORT=m
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-15 17:38   ` Toralf Förster
@ 2013-07-15 23:25     ` Rafael J. Wysocki
  0 siblings, 0 replies; 53+ messages in thread
From: Rafael J. Wysocki @ 2013-07-15 23:25 UTC (permalink / raw)
  To: Toralf Förster
  Cc: Srivatsa S. Bhat, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Monday, July 15, 2013 07:38:02 PM Toralf Förster wrote:
> On 07/12/2013 12:33 AM, Rafael J. Wysocki wrote:
> > I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
> > hate them.  This way we'll have some more testing coverage before they reach
> > the mainline hopefully.
> 
> Applied patch 1#8 on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup

Sorry, I have no idea what 1#8 means.

> cycles fine and crashed the system at the 3rd attempt / one times just
> at the 4th (blinking power led, no sysrq, ...).
> 
> Applying patch 1-8 on top of that tree differs in that way that it
> crashes now the system even at the 1st attempt or at least at the 2nd

What are you talking about?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-15 10:05     ` Srivatsa S. Bhat
  2013-07-15 10:21       ` Viresh Kumar
  2013-07-15 11:35       ` Rafael J. Wysocki
@ 2013-07-16  6:15       ` Viresh Kumar
  2013-07-16  8:56         ` Srivatsa S. Bhat
  2 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-16  6:15 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 15 July 2013 15:35, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> Actually even I was wondering about this while writing the patch and
> I even tested shutdown after multiple suspend/resume cycles, to verify that
> the refcount is messed up. But surprisingly, things worked just fine.
>
> Logically there should've been a refcount mismatch and things should have
> failed, but everything worked fine during my tests. Apart from suspend/resume
> and shutdown tests, I even tried mixing a few regular CPU hotplug operations
> (echo 0/1 to sysfs online files), but nothing stood out.
>
> Sorry, I forgot to document this in the patch. Either the patch is wrong
> or something else is silently fixing this up. Not sure what is the exact
> situation.

To understand it I actually applied your patches to get better view of the code.
(Haven't tested it though).. And found that your code is doing the right thing
and we shouldn't get a mismatch.. This is the sequence of events I can draw:

- __cpu_add_dev() for first cpu. sets the refcount to 'x', where x are
the no. of
cpus in its clock domain.
- _cpu_add_dev() for other cpus: doesn't change anything in refcount

- Suspend:
 - cpu_remove_dev() for all cpus, due to frozen flag we don't touch the value
of count
- Resume:
 - cpu_add_dev() for all cpus, due to frozen flag we don't touch the
value of count.

And so things work as expected. That's why your code isn't breaking anything I
believe.

But can no. of cpus change inbetween suspend/resume? Then count would be
tricky as we are using the same policy structure.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-16  6:15       ` Viresh Kumar
@ 2013-07-16  8:56         ` Srivatsa S. Bhat
  2013-07-16  9:10           ` Viresh Kumar
  0 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-16  8:56 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/16/2013 11:45 AM, Viresh Kumar wrote:
> On 15 July 2013 15:35, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> Actually even I was wondering about this while writing the patch and
>> I even tested shutdown after multiple suspend/resume cycles, to verify that
>> the refcount is messed up. But surprisingly, things worked just fine.
>>
>> Logically there should've been a refcount mismatch and things should have
>> failed, but everything worked fine during my tests. Apart from suspend/resume
>> and shutdown tests, I even tried mixing a few regular CPU hotplug operations
>> (echo 0/1 to sysfs online files), but nothing stood out.
>>
>> Sorry, I forgot to document this in the patch. Either the patch is wrong
>> or something else is silently fixing this up. Not sure what is the exact
>> situation.
> 
> To understand it I actually applied your patches to get better view of the code.
> (Haven't tested it though).. And found that your code is doing the right thing
> and we shouldn't get a mismatch.. This is the sequence of events I can draw:
> 
> - __cpu_add_dev() for first cpu. sets the refcount to 'x', where x are
> the no. of
> cpus in its clock domain.
> - _cpu_add_dev() for other cpus: doesn't change anything in refcount
> 
> - Suspend:
>  - cpu_remove_dev() for all cpus, due to frozen flag we don't touch the value
> of count
> - Resume:
>  - cpu_add_dev() for all cpus, due to frozen flag we don't touch the
> value of count.
>

Actually this one is tricky (I took a look again). So we have this code in the
beginning of _cpufreq_add_dev():


1008 #ifdef CONFIG_SMP
1009         /* check whether a different CPU already registered this
1010          * CPU because it is in the same boat. */
1011         policy = cpufreq_cpu_get(cpu);
1012         if (unlikely(policy)) {
1013                 cpufreq_cpu_put(policy);
1014                 return 0;
1015         }

The _get() is not controlled by the frozen flag, but it still doesn't take a
refcount because of a subtle reason: per_cpu(cpufreq_cpu_data, cpu) was set to
NULL in __cpufreq_remove_dev() and the memory was saved away in fallback storage.
So, when __cpufreq_cpu_get() executes, it sees:

 204         /* get the CPU */
 205         data = per_cpu(cpufreq_cpu_data, cpu);
 206 
 207         if (!data)
 208                 goto err_out_put_module;

Thus, since data is NULL, cpufreq_cpu_get() won't take a refcount and will return
silently.

Further down in __cpufreq_add_dev(), we restore the original memory, using
the frozen flag:

1037         if (frozen)
1038                 /* Restore the saved policy when doing light-weight init */
1039                 policy = cpufreq_policy_restore(cpu);
1040         else
1041                 policy = cpufreq_policy_alloc();


So that is how we manage to fool cpufreq_cpu_get() into not taking a fresh
refcount while resuming :)
 
> And so things work as expected. That's why your code isn't breaking anything I
> believe.
> 

Thanks a lot for the code inspection and your detailed analysis!

> But can no. of cpus change inbetween suspend/resume? Then count would be
> tricky as we are using the same policy structure.
> 

No, number of CPUs won't change in between suspend/resume. Even if somebody
tried that, that would be an eccentric case and we won't handle that.
Besides, *many more* things will break than just cpufreq, if somebody actually
tries that out!

Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-16  8:56         ` Srivatsa S. Bhat
@ 2013-07-16  9:10           ` Viresh Kumar
  2013-07-16  9:29             ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-16  9:10 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 16 July 2013 14:26, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> On 07/16/2013 11:45 AM, Viresh Kumar wrote:

>> To understand it I actually applied your patches to get better view of the code.
>> (Haven't tested it though).. And found that your code is doing the right thing
>> and we shouldn't get a mismatch.. This is the sequence of events I can draw:
>>
>> - __cpu_add_dev() for first cpu. sets the refcount to 'x', where x are
>> the no. of
>> cpus in its clock domain.
>> - _cpu_add_dev() for other cpus: doesn't change anything in refcount
>>
>> - Suspend:
>>  - cpu_remove_dev() for all cpus, due to frozen flag we don't touch the value
>> of count
>> - Resume:
>>  - cpu_add_dev() for all cpus, due to frozen flag we don't touch the
>> value of count.
>>
>
> Actually this one is tricky (I took a look again). So we have this code in the
> beginning of _cpufreq_add_dev():
>
>
> 1008 #ifdef CONFIG_SMP
> 1009         /* check whether a different CPU already registered this
> 1010          * CPU because it is in the same boat. */
> 1011         policy = cpufreq_cpu_get(cpu);
> 1012         if (unlikely(policy)) {
> 1013                 cpufreq_cpu_put(policy);
> 1014                 return 0;
> 1015         }
>
> The _get() is not controlled by the frozen flag, but it still doesn't take a
> refcount because of a subtle reason: per_cpu(cpufreq_cpu_data, cpu) was set to
> NULL in __cpufreq_remove_dev() and the memory was saved away in fallback storage.
> So, when __cpufreq_cpu_get() executes, it sees:
>
>  204         /* get the CPU */
>  205         data = per_cpu(cpufreq_cpu_data, cpu);
>  206
>  207         if (!data)
>  208                 goto err_out_put_module;
>
> Thus, since data is NULL, cpufreq_cpu_get() won't take a refcount and will return
> silently.

Even if this wouldn't have happened, refcount wouldn't have been
touched due to this code:

> 1012         if (unlikely(policy)) {
> 1013                 cpufreq_cpu_put(policy);
> 1014                 return 0;
> 1015         }

i.e. If we get a valid policy structure, we siimply put the policy again
and so decrement the incremented refcount.

So, even if you don't keep the fallback storage, things should work
without any issue (probably worth trying as this will get rid of a per
cpu variable :))

> Further down in __cpufreq_add_dev(), we restore the original memory, using
> the frozen flag:
>
> 1037         if (frozen)
> 1038                 /* Restore the saved policy when doing light-weight init */
> 1039                 policy = cpufreq_policy_restore(cpu);
> 1040         else
> 1041                 policy = cpufreq_policy_alloc();
>
>
> So that is how we manage to fool cpufreq_cpu_get() into not taking a fresh
> refcount while resuming :)

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-16  9:10           ` Viresh Kumar
@ 2013-07-16  9:29             ` Srivatsa S. Bhat
  2013-07-16  9:35               ` Viresh Kumar
  0 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-16  9:29 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/16/2013 02:40 PM, Viresh Kumar wrote:
> On 16 July 2013 14:26, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> On 07/16/2013 11:45 AM, Viresh Kumar wrote:
> 
>>> To understand it I actually applied your patches to get better view of the code.
>>> (Haven't tested it though).. And found that your code is doing the right thing
>>> and we shouldn't get a mismatch.. This is the sequence of events I can draw:
>>>
>>> - __cpu_add_dev() for first cpu. sets the refcount to 'x', where x are
>>> the no. of
>>> cpus in its clock domain.
>>> - _cpu_add_dev() for other cpus: doesn't change anything in refcount
>>>
>>> - Suspend:
>>>  - cpu_remove_dev() for all cpus, due to frozen flag we don't touch the value
>>> of count
>>> - Resume:
>>>  - cpu_add_dev() for all cpus, due to frozen flag we don't touch the
>>> value of count.
>>>
>>
>> Actually this one is tricky (I took a look again). So we have this code in the
>> beginning of _cpufreq_add_dev():
>>
>>
>> 1008 #ifdef CONFIG_SMP
>> 1009         /* check whether a different CPU already registered this
>> 1010          * CPU because it is in the same boat. */
>> 1011         policy = cpufreq_cpu_get(cpu);
>> 1012         if (unlikely(policy)) {
>> 1013                 cpufreq_cpu_put(policy);
>> 1014                 return 0;
>> 1015         }
>>
>> The _get() is not controlled by the frozen flag, but it still doesn't take a
>> refcount because of a subtle reason: per_cpu(cpufreq_cpu_data, cpu) was set to
>> NULL in __cpufreq_remove_dev() and the memory was saved away in fallback storage.
>> So, when __cpufreq_cpu_get() executes, it sees:
>>
>>  204         /* get the CPU */
>>  205         data = per_cpu(cpufreq_cpu_data, cpu);
>>  206
>>  207         if (!data)
>>  208                 goto err_out_put_module;
>>
>> Thus, since data is NULL, cpufreq_cpu_get() won't take a refcount and will return
>> silently.
> 
> Even if this wouldn't have happened, refcount wouldn't have been
> touched due to this code:
> 
>> 1012         if (unlikely(policy)) {
>> 1013                 cpufreq_cpu_put(policy);
>> 1014                 return 0;
>> 1015         }
> 
> i.e. If we get a valid policy structure, we siimply put the policy again
> and so decrement the incremented refcount.

Ah, yes!

> 
> So, even if you don't keep the fallback storage, things should work
> without any issue (probably worth trying as this will get rid of a per
> cpu variable :))
>

No, I already tried that and it didn't work ;-( The thing is, we need the
__cpufreq_add_dev() code to call the ->init() routines of drivers etc. But if
it finds the policy structure, it will skip all of that initialization and happily
proceed. Which is precisely the cause of all the erratic behaviour we are seeing
(ie., lack of proper initialization post-resume).

So this approach keeps the memory preserved in a fallback storage and lets the
init code run to full completion without any issues.

Perhaps we could do some _more_ code reorganization in the future to take this
issue into account etc., but IMHO that might be non-trivial. I'm trying to keep
this as simple and straight-forward as possible as a first step, to atleast get
it properly working. (Changing the order in which init is done is kinda scary
since its hard to comprehend what assumptions we might be breaking!).

We can perhaps revisit your idea later and optimize out the extra per-cpu data.
 
>> Further down in __cpufreq_add_dev(), we restore the original memory, using
>> the frozen flag:
>>
>> 1037         if (frozen)
>> 1038                 /* Restore the saved policy when doing light-weight init */
>> 1039                 policy = cpufreq_policy_restore(cpu);
>> 1040         else
>> 1041                 policy = cpufreq_policy_alloc();
>>
>>
>> So that is how we manage to fool cpufreq_cpu_get() into not taking a fresh
>> refcount while resuming :)
 
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-16  9:29             ` Srivatsa S. Bhat
@ 2013-07-16  9:35               ` Viresh Kumar
  2013-07-16  9:54                 ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Viresh Kumar @ 2013-07-16  9:35 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 16 July 2013 14:59, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> On 07/16/2013 02:40 PM, Viresh Kumar wrote:

>> So, even if you don't keep the fallback storage, things should work
>> without any issue (probably worth trying as this will get rid of a per
>> cpu variable :))
>>
>
> No, I already tried that and it didn't work ;-( The thing is, we need the
> __cpufreq_add_dev() code to call the ->init() routines of drivers etc. But if
> it finds the policy structure, it will skip all of that initialization and happily
> proceed. Which is precisely the cause of all the erratic behaviour we are seeing
> (ie., lack of proper initialization post-resume).

I missed that point. :)

> So this approach keeps the memory preserved in a fallback storage and lets the
> init code run to full completion without any issues.
>
> Perhaps we could do some _more_ code reorganization in the future to take this
> issue into account etc., but IMHO that might be non-trivial. I'm trying to keep
> this as simple and straight-forward as possible as a first step, to atleast get
> it properly working. (Changing the order in which init is done is kinda scary
> since its hard to comprehend what assumptions we might be breaking!).
>
> We can perhaps revisit your idea later and optimize out the extra per-cpu data.

No, we don't need to optimize it that way. Current design looks good
for now.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume
  2013-07-16  9:35               ` Viresh Kumar
@ 2013-07-16  9:54                 ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-16  9:54 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: rjw, toralf.foerster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/16/2013 03:05 PM, Viresh Kumar wrote:
> On 16 July 2013 14:59, Srivatsa S. Bhat
> <srivatsa.bhat@linux.vnet.ibm.com> wrote:
>> On 07/16/2013 02:40 PM, Viresh Kumar wrote:
> 
>>> So, even if you don't keep the fallback storage, things should work
>>> without any issue (probably worth trying as this will get rid of a per
>>> cpu variable :))
>>>
>>
>> No, I already tried that and it didn't work ;-( The thing is, we need the
>> __cpufreq_add_dev() code to call the ->init() routines of drivers etc. But if
>> it finds the policy structure, it will skip all of that initialization and happily
>> proceed. Which is precisely the cause of all the erratic behaviour we are seeing
>> (ie., lack of proper initialization post-resume).
> 
> I missed that point. :)
> 
>> So this approach keeps the memory preserved in a fallback storage and lets the
>> init code run to full completion without any issues.
>>
>> Perhaps we could do some _more_ code reorganization in the future to take this
>> issue into account etc., but IMHO that might be non-trivial. I'm trying to keep
>> this as simple and straight-forward as possible as a first step, to atleast get
>> it properly working. (Changing the order in which init is done is kinda scary
>> since its hard to comprehend what assumptions we might be breaking!).
>>
>> We can perhaps revisit your idea later and optimize out the extra per-cpu data.
> 
> No, we don't need to optimize it that way. Current design looks good
> for now.

Cool! Thanks :)

Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-11 22:23   ` Srivatsa S. Bhat
@ 2013-07-16 15:15     ` Toralf Förster
  2013-07-16 21:32       ` Rafael J. Wysocki
  0 siblings, 1 reply; 53+ messages in thread
From: Toralf Förster @ 2013-07-16 15:15 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: Rafael J. Wysocki, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/12/2013 12:23 AM, Srivatsa S. Bhat wrote:
> On 07/12/2013 04:03 AM, Rafael J. Wysocki wrote:
>> On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
>>>
>>> Hi,
>>
>> Hi,
>>
>>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
>>> some subtle regressions in the cpufreq subsystem during suspend/resume.
>>> This patchset is aimed at rectifying those problems, by fixing the regression
>>> as well as achieving the original goal of that commit in a proper way.
>>>
>>> Patch 1 reverts the above commit, and is CC'ed to stable.
>>>
>>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
>>> in as general cleanups as well. This reorganization builds a base that the
>>> rest of the patches will make use of.
>>>
>>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
>>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
>>> across suspend/resume.
>>>
>>> All the patches apply on current mainline.
>>>
>>>
>>> Robert, Durgadoss, it would be great if you could try it out and see if it works
>>> well for your usecase. I tested it locally and cpufreq related files did retain
>>> their permissions across suspend/resume. Let me know if it works fine in your
>>> setup too.
>>>
>>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>>> whether their systems work fine after:
>>> a. applying only the first commit (this is what gets backported to stable)
>>> b. applying all the commits
>>>
>>> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
>>> testing this patchset. Though that patch also touches cpufreq subsystem, it
>>> doesn't affect this patchset in any way and there is absolutely no dependency
>>> between the two in terms of code. That fix just makes basic CPU hotplug work
>>> without locking up on current mainline).
>>>
>>> [1]. https://lkml.org/lkml/2013/7/10/611
>>>
>>>
>>> Thank you very much!
>>
>> Thanks Srivatsa!
>>
>> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
>> hate them.  This way we'll have some more testing coverage before they reach
>> the mainline hopefully.
>>

On 07/16/2013 01:25 AM, Rafael J. Wysocki wrote:> On Monday, July 15, 2013 07:38:02 PM Toralf Förster wrote:
> Sorry, I have no idea what 1#8 means.

sry - here again with full quote of the email :

I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
cycles fine and crashed the system at the 3rd attempt / one times just at
the 4th (blinking power led, no sysrq, ...).

Applying patch 1-8 on top of that tree differs in that way that it
crashes now the system even at the 1st attempt or at least at the 2nd

My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
Gentoo Linux - FWIW .config attached.

> 
> Sounds great! Thanks a lot Rafael!
>  
> Regards,
> Srivatsa S. Bhat
> 
> 


-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-16 15:15     ` Toralf Förster
@ 2013-07-16 21:32       ` Rafael J. Wysocki
  2013-07-17  5:03         ` Srivatsa S. Bhat
  2013-07-17 15:27         ` Toralf Förster
  0 siblings, 2 replies; 53+ messages in thread
From: Rafael J. Wysocki @ 2013-07-16 21:32 UTC (permalink / raw)
  To: Toralf Förster
  Cc: Srivatsa S. Bhat, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
> On 07/12/2013 12:23 AM, Srivatsa S. Bhat wrote:
> > On 07/12/2013 04:03 AM, Rafael J. Wysocki wrote:
> >> On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
> >>>
> >>> Hi,
> >>
> >> Hi,
> >>
> >>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
> >>> some subtle regressions in the cpufreq subsystem during suspend/resume.
> >>> This patchset is aimed at rectifying those problems, by fixing the regression
> >>> as well as achieving the original goal of that commit in a proper way.
> >>>
> >>> Patch 1 reverts the above commit, and is CC'ed to stable.
> >>>
> >>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
> >>> in as general cleanups as well. This reorganization builds a base that the
> >>> rest of the patches will make use of.
> >>>
> >>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
> >>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
> >>> across suspend/resume.
> >>>
> >>> All the patches apply on current mainline.
> >>>
> >>>
> >>> Robert, Durgadoss, it would be great if you could try it out and see if it works
> >>> well for your usecase. I tested it locally and cpufreq related files did retain
> >>> their permissions across suspend/resume. Let me know if it works fine in your
> >>> setup too.
> >>>
> >>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
> >>> whether their systems work fine after:
> >>> a. applying only the first commit (this is what gets backported to stable)
> >>> b. applying all the commits
> >>>
> >>> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
> >>> testing this patchset. Though that patch also touches cpufreq subsystem, it
> >>> doesn't affect this patchset in any way and there is absolutely no dependency
> >>> between the two in terms of code. That fix just makes basic CPU hotplug work
> >>> without locking up on current mainline).
> >>>
> >>> [1]. https://lkml.org/lkml/2013/7/10/611
> >>>
> >>>
> >>> Thank you very much!
> >>
> >> Thanks Srivatsa!
> >>
> >> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
> >> hate them.  This way we'll have some more testing coverage before they reach
> >> the mainline hopefully.
> >>
> 
> On 07/16/2013 01:25 AM, Rafael J. Wysocki wrote:> On Monday, July 15, 2013 07:38:02 PM Toralf Förster wrote:
> > Sorry, I have no idea what 1#8 means.
> 
> sry - here again with full quote of the email :
> 
> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
> cycles fine and crashed the system at the 3rd attempt / one times just at
> the 4th (blinking power led, no sysrq, ...).
> 
> Applying patch 1-8 on top of that tree differs in that way that it
> crashes now the system even at the 1st attempt or at least at the 2nd
> 
> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
> Gentoo Linux - FWIW .config attached.

I think you'll need the fixes first, basically [1/8] from this series and
this: https://patchwork.kernel.org/patch/2827512/ .

Please try to run with these two things applied only and see how that goes.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-16 21:32       ` Rafael J. Wysocki
@ 2013-07-17  5:03         ` Srivatsa S. Bhat
  2013-07-17 15:27         ` Toralf Förster
  1 sibling, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-17  5:03 UTC (permalink / raw)
  To: Toralf Förster
  Cc: Rafael J. Wysocki, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/17/2013 03:02 AM, Rafael J. Wysocki wrote:
> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
>> On 07/12/2013 12:23 AM, Srivatsa S. Bhat wrote:
>>> On 07/12/2013 04:03 AM, Rafael J. Wysocki wrote:
>>>> On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
>>>>>
>>>>> Hi,
>>>>
>>>> Hi,
>>>>
>>>>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
>>>>> some subtle regressions in the cpufreq subsystem during suspend/resume.
>>>>> This patchset is aimed at rectifying those problems, by fixing the regression
>>>>> as well as achieving the original goal of that commit in a proper way.
>>>>>
>>>>> Patch 1 reverts the above commit, and is CC'ed to stable.
>>>>>
>>>>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
>>>>> in as general cleanups as well. This reorganization builds a base that the
>>>>> rest of the patches will make use of.
>>>>>
>>>>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
>>>>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
>>>>> across suspend/resume.
>>>>>
>>>>> All the patches apply on current mainline.
>>>>>
>>>>>
>>>>> Robert, Durgadoss, it would be great if you could try it out and see if it works
>>>>> well for your usecase. I tested it locally and cpufreq related files did retain
>>>>> their permissions across suspend/resume. Let me know if it works fine in your
>>>>> setup too.
>>>>>
>>>>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>>>>> whether their systems work fine after:
>>>>> a. applying only the first commit (this is what gets backported to stable)
>>>>> b. applying all the commits
>>>>>
>>>>> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
>>>>> testing this patchset. Though that patch also touches cpufreq subsystem, it
>>>>> doesn't affect this patchset in any way and there is absolutely no dependency
>>>>> between the two in terms of code. That fix just makes basic CPU hotplug work
>>>>> without locking up on current mainline).
>>>>>
>>>>> [1]. https://lkml.org/lkml/2013/7/10/611
>>>>>
>>>>>
>>>>> Thank you very much!
>>>>
>>>> Thanks Srivatsa!
>>>>
>>>> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
>>>> hate them.  This way we'll have some more testing coverage before they reach
>>>> the mainline hopefully.
>>>>
>>
>> On 07/16/2013 01:25 AM, Rafael J. Wysocki wrote:> On Monday, July 15, 2013 07:38:02 PM Toralf Förster wrote:
>>> Sorry, I have no idea what 1#8 means.
>>
>> sry - here again with full quote of the email :
>>
>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>> cycles fine and crashed the system at the 3rd attempt / one times just at
>> the 4th (blinking power led, no sysrq, ...).
>>
>> Applying patch 1-8 on top of that tree differs in that way that it
>> crashes now the system even at the 1st attempt or at least at the 2nd
>>
>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>> Gentoo Linux - FWIW .config attached.
> 
> I think you'll need the fixes first, basically [1/8] from this series and
> this: https://patchwork.kernel.org/patch/2827512/ .
> 
> Please try to run with these two things applied only and see how that goes.
> 

In addition to what Rafael suggested above, also try running your kernel
with cpufreq completely turned off (CONFIG_CPU_FREQ=n). My patches touch only
cpufreq, so this experiment will tell us if your suspend/resume issues are
really related to cpufreq or not. If turning off cpufreq also breaks your
suspend/resume, then a fresh git-bisect might be the only way to go.
 
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-16 21:32       ` Rafael J. Wysocki
  2013-07-17  5:03         ` Srivatsa S. Bhat
@ 2013-07-17 15:27         ` Toralf Förster
  2013-07-17 15:49           ` Srivatsa S. Bhat
  1 sibling, 1 reply; 53+ messages in thread
From: Toralf Förster @ 2013-07-17 15:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Srivatsa S. Bhat, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
>> On 07/12/2013 12:23 AM, Srivatsa S. Bhat wrote:
>>> On 07/12/2013 04:03 AM, Rafael J. Wysocki wrote:
>>>> On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
>>>>>
>>>>> Hi,
>>>>
>>>> Hi,
>>>>
>>>>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
>>>>> some subtle regressions in the cpufreq subsystem during suspend/resume.
>>>>> This patchset is aimed at rectifying those problems, by fixing the regression
>>>>> as well as achieving the original goal of that commit in a proper way.
>>>>>
>>>>> Patch 1 reverts the above commit, and is CC'ed to stable.
>>>>>
>>>>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
>>>>> in as general cleanups as well. This reorganization builds a base that the
>>>>> rest of the patches will make use of.
>>>>>
>>>>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
>>>>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
>>>>> across suspend/resume.
>>>>>
>>>>> All the patches apply on current mainline.
>>>>>
>>>>>
>>>>> Robert, Durgadoss, it would be great if you could try it out and see if it works
>>>>> well for your usecase. I tested it locally and cpufreq related files did retain
>>>>> their permissions across suspend/resume. Let me know if it works fine in your
>>>>> setup too.
>>>>>
>>>>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>>>>> whether their systems work fine after:
>>>>> a. applying only the first commit (this is what gets backported to stable)
>>>>> b. applying all the commits
>>>>>
>>>>> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
>>>>> testing this patchset. Though that patch also touches cpufreq subsystem, it
>>>>> doesn't affect this patchset in any way and there is absolutely no dependency
>>>>> between the two in terms of code. That fix just makes basic CPU hotplug work
>>>>> without locking up on current mainline).
>>>>>
>>>>> [1]. https://lkml.org/lkml/2013/7/10/611
>>>>>
>>>>>
>>>>> Thank you very much!
>>>>
>>>> Thanks Srivatsa!
>>>>
>>>> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
>>>> hate them.  This way we'll have some more testing coverage before they reach
>>>> the mainline hopefully.
>>>>
>>
>> On 07/16/2013 01:25 AM, Rafael J. Wysocki wrote:> On Monday, July 15, 2013 07:38:02 PM Toralf Förster wrote:
>>> Sorry, I have no idea what 1#8 means.
>>
>> sry - here again with full quote of the email :
>>
>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>> cycles fine and crashed the system at the 3rd attempt / one times just at
>> the 4th (blinking power led, no sysrq, ...).
>>
>> Applying patch 1-8 on top of that tree differs in that way that it
>> crashes now the system even at the 1st attempt or at least at the 2nd
>>
>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>> Gentoo Linux - FWIW .config attached.
> 
> I think you'll need the fixes first, basically [1/8] from this series and
> this: https://patchwork.kernel.org/patch/2827512/ .
> 
> Please try to run with these two things applied only and see how that goes.
> 
> Thanks,
> Rafael
> 
> 
That was it.

Applying https://patchwork.kernel.org/patch/2827512/ and then patch
[1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
issue.

Furthermore applying patches 2-8 works too - suspend/wakeup works fine
and frequencies are scaled right after wakeup at the T420.


Thx

-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-17 15:27         ` Toralf Förster
@ 2013-07-17 15:49           ` Srivatsa S. Bhat
  2013-07-21  8:43               ` Srivatsa S. Bhat
  0 siblings, 1 reply; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-17 15:49 UTC (permalink / raw)
  To: Toralf Förster, Rafael J. Wysocki
  Cc: viresh.kumar, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/17/2013 08:57 PM, Toralf Förster wrote:
> On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
>> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
>>> On 07/12/2013 12:23 AM, Srivatsa S. Bhat wrote:
>>>> On 07/12/2013 04:03 AM, Rafael J. Wysocki wrote:
>>>>> On Friday, July 12, 2013 03:45:17 AM Srivatsa S. Bhat wrote:
>>>>>>
>>>>>> Hi,
>>>>>
>>>>> Hi,
>>>>>
>>>>>> Commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume) caused
>>>>>> some subtle regressions in the cpufreq subsystem during suspend/resume.
>>>>>> This patchset is aimed at rectifying those problems, by fixing the regression
>>>>>> as well as achieving the original goal of that commit in a proper way.
>>>>>>
>>>>>> Patch 1 reverts the above commit, and is CC'ed to stable.
>>>>>>
>>>>>> Patches 2 - 5 reorganize the code and have no functional impact, and can go
>>>>>> in as general cleanups as well. This reorganization builds a base that the
>>>>>> rest of the patches will make use of.
>>>>>>
>>>>>> Patch 6 and 7 add a mechanism to perform light-weight init/tear-down of CPUs
>>>>>> in the cpufreq subsystem and finally patch 8 uses it to preserve sysfs files
>>>>>> across suspend/resume.
>>>>>>
>>>>>> All the patches apply on current mainline.
>>>>>>
>>>>>>
>>>>>> Robert, Durgadoss, it would be great if you could try it out and see if it works
>>>>>> well for your usecase. I tested it locally and cpufreq related files did retain
>>>>>> their permissions across suspend/resume. Let me know if it works fine in your
>>>>>> setup too.
>>>>>>
>>>>>> And I'd of course appreciate to hear from Dirk, Tianyu and Toralf to know
>>>>>> whether their systems work fine after:
>>>>>> a. applying only the first commit (this is what gets backported to stable)
>>>>>> b. applying all the commits
>>>>>>
>>>>>> (Note: I had to use Michael's fix[1] to avoid CPU hotplug deadlock while
>>>>>> testing this patchset. Though that patch also touches cpufreq subsystem, it
>>>>>> doesn't affect this patchset in any way and there is absolutely no dependency
>>>>>> between the two in terms of code. That fix just makes basic CPU hotplug work
>>>>>> without locking up on current mainline).
>>>>>>
>>>>>> [1]. https://lkml.org/lkml/2013/7/10/611
>>>>>>
>>>>>>
>>>>>> Thank you very much!
>>>>>
>>>>> Thanks Srivatsa!
>>>>>
>>>>> I'm going to take [1/8] for 3.11 and queue up the rest for 3.12 if people don't
>>>>> hate them.  This way we'll have some more testing coverage before they reach
>>>>> the mainline hopefully.
>>>>>
>>>
>>> On 07/16/2013 01:25 AM, Rafael J. Wysocki wrote:> On Monday, July 15, 2013 07:38:02 PM Toralf Förster wrote:
>>>> Sorry, I have no idea what 1#8 means.
>>>
>>> sry - here again with full quote of the email :
>>>
>>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>>> cycles fine and crashed the system at the 3rd attempt / one times just at
>>> the 4th (blinking power led, no sysrq, ...).
>>>
>>> Applying patch 1-8 on top of that tree differs in that way that it
>>> crashes now the system even at the 1st attempt or at least at the 2nd
>>>
>>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>>> Gentoo Linux - FWIW .config attached.
>>
>> I think you'll need the fixes first, basically [1/8] from this series and
>> this: https://patchwork.kernel.org/patch/2827512/ .
>>
>> Please try to run with these two things applied only and see how that goes.
>>
>> Thanks,
>> Rafael
>>
>>
> That was it.
> 
> Applying https://patchwork.kernel.org/patch/2827512/ and then patch
> [1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
> issue.
> 
> Furthermore applying patches 2-8 works too - suspend/wakeup works fine
> and frequencies are scaled right after wakeup at the T420.
> 

Phew! Finally :-)

Thank you for all your testing efforts!
 
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-17 15:49           ` Srivatsa S. Bhat
@ 2013-07-21  8:43               ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-21  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, viresh.kumar
  Cc: Toralf Förster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/17/2013 09:19 PM, Srivatsa S. Bhat wrote:
> On 07/17/2013 08:57 PM, Toralf Förster wrote:
>> On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
>>> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
[...]
>>>> sry - here again with full quote of the email :
>>>>
>>>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>>>> cycles fine and crashed the system at the 3rd attempt / one times just at
>>>> the 4th (blinking power led, no sysrq, ...).
>>>>
>>>> Applying patch 1-8 on top of that tree differs in that way that it
>>>> crashes now the system even at the 1st attempt or at least at the 2nd
>>>>
>>>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>>>> Gentoo Linux - FWIW .config attached.
>>>
>>> I think you'll need the fixes first, basically [1/8] from this series and
>>> this: https://patchwork.kernel.org/patch/2827512/ .
>>>
>>> Please try to run with these two things applied only and see how that goes.
>>>
>>> Thanks,
>>> Rafael
>>>
>>>
>> That was it.
>>
>> Applying https://patchwork.kernel.org/patch/2827512/ and then patch
>> [1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
>> issue.
>>
>> Furthermore applying patches 2-8 works too - suspend/wakeup works fine
>> and frequencies are scaled right after wakeup at the T420.
>>
> 
> Phew! Finally :-)
> 
> Thank you for all your testing efforts!
> 

Rafael, Viresh, any thoughts on picking up patches 2-8 from this series
for 3.12?

>From the discussions on this thread so far, there are no pending issues:
Toralf verified that these patches work fine on his system, as he mentioned
above, and Tianyu Lan independently tested this patchset and found no
issues with them. Also, Viresh analyzed the refcounting used in the patches
and we came to the conclusion that there is no problem with them either.

 
Regards,
Srivatsa S. Bhat



^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
@ 2013-07-21  8:43               ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-21  8:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, viresh.kumar
  Cc: Toralf Förster, robert.jarzmik, durgadoss.r, tianyu.lan,
	lantianyu1986, dirk.brandewie, stern, linux-pm, linux-kernel

On 07/17/2013 09:19 PM, Srivatsa S. Bhat wrote:
> On 07/17/2013 08:57 PM, Toralf Förster wrote:
>> On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
>>> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
[...]
>>>> sry - here again with full quote of the email :
>>>>
>>>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>>>> cycles fine and crashed the system at the 3rd attempt / one times just at
>>>> the 4th (blinking power led, no sysrq, ...).
>>>>
>>>> Applying patch 1-8 on top of that tree differs in that way that it
>>>> crashes now the system even at the 1st attempt or at least at the 2nd
>>>>
>>>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>>>> Gentoo Linux - FWIW .config attached.
>>>
>>> I think you'll need the fixes first, basically [1/8] from this series and
>>> this: https://patchwork.kernel.org/patch/2827512/ .
>>>
>>> Please try to run with these two things applied only and see how that goes.
>>>
>>> Thanks,
>>> Rafael
>>>
>>>
>> That was it.
>>
>> Applying https://patchwork.kernel.org/patch/2827512/ and then patch
>> [1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
>> issue.
>>
>> Furthermore applying patches 2-8 works too - suspend/wakeup works fine
>> and frequencies are scaled right after wakeup at the T420.
>>
> 
> Phew! Finally :-)
> 
> Thank you for all your testing efforts!
> 

Rafael, Viresh, any thoughts on picking up patches 2-8 from this series
for 3.12?

From the discussions on this thread so far, there are no pending issues:
Toralf verified that these patches work fine on his system, as he mentioned
above, and Tianyu Lan independently tested this patchset and found no
issues with them. Also, Viresh analyzed the refcounting used in the patches
and we came to the conclusion that there is no problem with them either.

 
Regards,
Srivatsa S. Bhat



^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-21  8:43               ` Srivatsa S. Bhat
  (?)
@ 2013-07-21  9:40               ` Toralf Förster
  2013-07-21 10:38                 ` Srivatsa S. Bhat
  -1 siblings, 1 reply; 53+ messages in thread
From: Toralf Förster @ 2013-07-21  9:40 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: Rafael J. Wysocki, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/21/2013 10:43 AM, Srivatsa S. Bhat wrote:
> On 07/17/2013 09:19 PM, Srivatsa S. Bhat wrote:
>> On 07/17/2013 08:57 PM, Toralf Förster wrote:
>>> On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
>>>> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
> [...]
>>>>> sry - here again with full quote of the email :
>>>>>
>>>>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>>>>> cycles fine and crashed the system at the 3rd attempt / one times just at
>>>>> the 4th (blinking power led, no sysrq, ...).
>>>>>
>>>>> Applying patch 1-8 on top of that tree differs in that way that it
>>>>> crashes now the system even at the 1st attempt or at least at the 2nd
>>>>>
>>>>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>>>>> Gentoo Linux - FWIW .config attached.
>>>>
>>>> I think you'll need the fixes first, basically [1/8] from this series and
>>>> this: https://patchwork.kernel.org/patch/2827512/ .
>>>>
>>>> Please try to run with these two things applied only and see how that goes.
>>>>
>>>> Thanks,
>>>> Rafael
>>>>
>>>>
>>> That was it.
>>>
>>> Applying https://patchwork.kernel.org/patch/2827512/ and then patch
>>> [1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
>>> issue.
>>>
>>> Furthermore applying patches 2-8 works too - suspend/wakeup works fine
>>> and frequencies are scaled right after wakeup at the T420.
>>>
>>
>> Phew! Finally :-)
>>
>> Thank you for all your testing efforts!
>>
> 
> Rafael, Viresh, any thoughts on picking up patches 2-8 from this series
> for 3.12?

What's about the additional patch Rafael adviced me in this thread:
https://patchwork.kernel.org/patch/2827512/
?

On my ThinkPad T420 I do have to apply this on top of 3.10.1 otherwise I
do suffer from the hang during s2ram.

>>From the discussions on this thread so far, there are no pending issues:
> Toralf verified that these patches work fine on his system, as he mentioned
> above, and Tianyu Lan independently tested this patchset and found no
> issues with them. Also, Viresh analyzed the refcounting used in the patches
> and we came to the conclusion that there is no problem with them either.
> 
>  
> Regards,
> Srivatsa S. Bhat
> 
> 
> 


-- 
MfG/Sincerely
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-21  9:40               ` Toralf Förster
@ 2013-07-21 10:38                 ` Srivatsa S. Bhat
  0 siblings, 0 replies; 53+ messages in thread
From: Srivatsa S. Bhat @ 2013-07-21 10:38 UTC (permalink / raw)
  To: Toralf Förster
  Cc: Rafael J. Wysocki, viresh.kumar, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On 07/21/2013 03:10 PM, Toralf Förster wrote:
> On 07/21/2013 10:43 AM, Srivatsa S. Bhat wrote:
>> On 07/17/2013 09:19 PM, Srivatsa S. Bhat wrote:
>>> On 07/17/2013 08:57 PM, Toralf Förster wrote:
>>>> On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
>>>>> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
>> [...]
>>>>>> sry - here again with full quote of the email :
>>>>>>
>>>>>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
>>>>>> cycles fine and crashed the system at the 3rd attempt / one times just at
>>>>>> the 4th (blinking power led, no sysrq, ...).
>>>>>>
>>>>>> Applying patch 1-8 on top of that tree differs in that way that it
>>>>>> crashes now the system even at the 1st attempt or at least at the 2nd
>>>>>>
>>>>>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
>>>>>> Gentoo Linux - FWIW .config attached.
>>>>>
>>>>> I think you'll need the fixes first, basically [1/8] from this series and
>>>>> this: https://patchwork.kernel.org/patch/2827512/ .
>>>>>
>>>>> Please try to run with these two things applied only and see how that goes.
>>>>>
>>>>> Thanks,
>>>>> Rafael
>>>>>
>>>>>
>>>> That was it.
>>>>
>>>> Applying https://patchwork.kernel.org/patch/2827512/ and then patch
>>>> [1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
>>>> issue.
>>>>
>>>> Furthermore applying patches 2-8 works too - suspend/wakeup works fine
>>>> and frequencies are scaled right after wakeup at the T420.
>>>>
>>>
>>> Phew! Finally :-)
>>>
>>> Thank you for all your testing efforts!
>>>
>>
>> Rafael, Viresh, any thoughts on picking up patches 2-8 from this series
>> for 3.12?
> 
> What's about the additional patch Rafael adviced me in this thread:
> https://patchwork.kernel.org/patch/2827512/
> ?
> 
> On my ThinkPad T420 I do have to apply this on top of 3.10.1 otherwise I
> do suffer from the hang during s2ram.
> 

Rafael already picked it up and in fact its now in the mainline kernel
as commit:

commit e8d05276f236ee6435e78411f62be9714e0b9377
Author: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Date:   Tue Jul 16 22:46:48 2013 +0200

    cpufreq: Revert commit 2f7021a8 to fix CPU hotplug regression
    

Thanks for following up on that fix, Toralf!
Regards,
Srivatsa S. Bhat


^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes
  2013-07-21  8:43               ` Srivatsa S. Bhat
  (?)
  (?)
@ 2013-07-21 12:59               ` Rafael J. Wysocki
  -1 siblings, 0 replies; 53+ messages in thread
From: Rafael J. Wysocki @ 2013-07-21 12:59 UTC (permalink / raw)
  To: Srivatsa S. Bhat
  Cc: viresh.kumar, Toralf Förster, robert.jarzmik, durgadoss.r,
	tianyu.lan, lantianyu1986, dirk.brandewie, stern, linux-pm,
	linux-kernel

On Sunday, July 21, 2013 02:13:42 PM Srivatsa S. Bhat wrote:
> On 07/17/2013 09:19 PM, Srivatsa S. Bhat wrote:
> > On 07/17/2013 08:57 PM, Toralf Förster wrote:
> >> On 07/16/2013 11:32 PM, Rafael J. Wysocki wrote:
> >>> On Tuesday, July 16, 2013 05:15:14 PM Toralf Förster wrote:
> [...]
> >>>> sry - here again with full quote of the email :
> >>>>
> >>>> I applied patch [1/8] on top of v3.11-rc1-8-g47188d3 passes two s2ram/wakeup
> >>>> cycles fine and crashed the system at the 3rd attempt / one times just at
> >>>> the 4th (blinking power led, no sysrq, ...).
> >>>>
> >>>> Applying patch 1-8 on top of that tree differs in that way that it
> >>>> crashes now the system even at the 1st attempt or at least at the 2nd
> >>>>
> >>>> My hardware is a ThinkPad T420 with latest BIOS and a 32 bit stable
> >>>> Gentoo Linux - FWIW .config attached.
> >>>
> >>> I think you'll need the fixes first, basically [1/8] from this series and
> >>> this: https://patchwork.kernel.org/patch/2827512/ .
> >>>
> >>> Please try to run with these two things applied only and see how that goes.
> >>>
> >>> Thanks,
> >>> Rafael
> >>>
> >>>
> >> That was it.
> >>
> >> Applying https://patchwork.kernel.org/patch/2827512/ and then patch
> >> [1/8] on top of v3.11-rc1-8-g47188d3 works fine and solved the reported
> >> issue.
> >>
> >> Furthermore applying patches 2-8 works too - suspend/wakeup works fine
> >> and frequencies are scaled right after wakeup at the T420.
> >>
> > 
> > Phew! Finally :-)
> > 
> > Thank you for all your testing efforts!
> > 
> 
> Rafael, Viresh, any thoughts on picking up patches 2-8 from this series
> for 3.12?
> 
> From the discussions on this thread so far, there are no pending issues:
> Toralf verified that these patches work fine on his system, as he mentioned
> above, and Tianyu Lan independently tested this patchset and found no
> issues with them. Also, Viresh analyzed the refcounting used in the patches
> and we came to the conclusion that there is no problem with them either.

Yes, I'm going to queue up that series for 3.12.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2013-07-21 12:49 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-11 22:15 [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Srivatsa S. Bhat
2013-07-11 22:15 ` [PATCH 1/8] cpufreq: Revert commit a66b2e to fix cpufreq regression during suspend/resume Srivatsa S. Bhat
2013-07-12  7:18   ` Viresh Kumar
2013-07-13 12:46     ` Paul Bolle
2013-07-15  6:18       ` Srivatsa S. Bhat
2013-07-11 22:15 ` [PATCH 2/8] cpufreq: Fix misplaced call to cpufreq_update_policy() Srivatsa S. Bhat
2013-07-12  7:06   ` Viresh Kumar
2013-07-15  6:20     ` Srivatsa S. Bhat
2013-07-15 11:37       ` Rafael J. Wysocki
2013-07-11 22:16 ` [PATCH 3/8] cpufreq: Add helper to perform alloc/free of policy structure Srivatsa S. Bhat
2013-07-12  7:09   ` Viresh Kumar
2013-07-15  6:24     ` Srivatsa S. Bhat
2013-07-11 22:16 ` [PATCH 4/8] cpufreq: Extract non-interface related stuff from cpufreq_add_dev_interface Srivatsa S. Bhat
2013-07-12  7:17   ` Viresh Kumar
2013-07-11 22:16 ` [PATCH 5/8] cpufreq: Extract the handover of policy cpu to a helper function Srivatsa S. Bhat
2013-07-12  7:19   ` Viresh Kumar
2013-07-11 22:16 ` [PATCH 6/8] cpufreq: Introduce a flag ('frozen') to separate full vs temporary init/teardown Srivatsa S. Bhat
2013-07-12  7:31   ` Viresh Kumar
2013-07-11 22:17 ` [PATCH 7/8] cpufreq: Preserve policy structure across suspend/resume Srivatsa S. Bhat
2013-07-15  9:55   ` Viresh Kumar
2013-07-15 10:05     ` Srivatsa S. Bhat
2013-07-15 10:21       ` Viresh Kumar
2013-07-15 11:52         ` Srivatsa S. Bhat
2013-07-15 11:35       ` Rafael J. Wysocki
2013-07-15 11:53         ` Srivatsa S. Bhat
2013-07-16  6:15       ` Viresh Kumar
2013-07-16  8:56         ` Srivatsa S. Bhat
2013-07-16  9:10           ` Viresh Kumar
2013-07-16  9:29             ` Srivatsa S. Bhat
2013-07-16  9:35               ` Viresh Kumar
2013-07-16  9:54                 ` Srivatsa S. Bhat
2013-07-11 22:17 ` [PATCH 8/8] cpufreq: Perform light-weight init/teardown during suspend/resume Srivatsa S. Bhat
2013-07-11 22:25 ` [PATCH 0/8] Cpufreq, cpu hotplug, suspend/resume related fixes Jarzmik, Robert
2013-07-11 22:25   ` Jarzmik, Robert
2013-07-11 22:33 ` Rafael J. Wysocki
2013-07-11 22:23   ` Srivatsa S. Bhat
2013-07-16 15:15     ` Toralf Förster
2013-07-16 21:32       ` Rafael J. Wysocki
2013-07-17  5:03         ` Srivatsa S. Bhat
2013-07-17 15:27         ` Toralf Förster
2013-07-17 15:49           ` Srivatsa S. Bhat
2013-07-21  8:43             ` Srivatsa S. Bhat
2013-07-21  8:43               ` Srivatsa S. Bhat
2013-07-21  9:40               ` Toralf Förster
2013-07-21 10:38                 ` Srivatsa S. Bhat
2013-07-21 12:59               ` Rafael J. Wysocki
2013-07-15 17:38   ` Toralf Förster
2013-07-15 23:25     ` Rafael J. Wysocki
2013-07-13  9:23 ` Toralf Förster
2013-07-13 13:50   ` Toralf Förster
2013-07-15  6:40     ` Srivatsa S. Bhat
2013-07-15  8:27 ` Lan Tianyu
2013-07-15  8:43   ` Srivatsa S. Bhat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.