public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: unbreak build for !CONFIG_SMP
@ 2009-07-08 19:24 Daniel Mack
  2009-07-09  8:43 ` [PATCH] cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP Thomas Renninger
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Mack @ 2009-07-08 19:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Daniel Mack, Mathieu Desnoyers, Venkatesh Pallipadi, rjw, mingo,
	Shaohua Li, Pekka Enberg, Dave Young, Rusty Russell, sven.wegener,
	cpufreq, Thomas Renninger, Dave Jones

'managed_policy' is used for the non-smp case in line 941.

Remove #ifdef CONFIG_SMP for its declaration in order to make cpufreq.c
build on systems with CONFIG_SMP=n.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: rjw@sisk.pl
Cc: mingo@elte.hu
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: sven.wegener@stealer.net
Cc: cpufreq@vger.kernel.org
Cc: Thomas Renninger <trenn@suse.de>
Cc: Dave Jones <davej@redhat.com>
---
 drivers/cpufreq/cpufreq.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index c668ac8..d160867 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -776,9 +776,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
 	struct sys_device *cpu_sys_dev;
 	unsigned long flags;
 	unsigned int j;
-#ifdef CONFIG_SMP
 	struct cpufreq_policy *managed_policy;
-#endif
 
 	if (cpu_is_offline(cpu))
 		return 0;
-- 
1.6.3.1


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

* [PATCH] cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP
  2009-07-08 19:24 [PATCH] cpufreq: unbreak build for !CONFIG_SMP Daniel Mack
@ 2009-07-09  8:43 ` Thomas Renninger
  2009-07-09  8:48   ` Daniel Mack
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Renninger @ 2009-07-09  8:43 UTC (permalink / raw)
  To: Daniel Mack
  Cc: linux-kernel, Mathieu Desnoyers, Venkatesh Pallipadi, rjw, mingo,
	Shaohua Li, Pekka Enberg, Dave Young, Rusty Russell, sven.wegener,
	cpufreq, Dave Jones

Or like that:
Either all #ifdef CONFIG_SMP related conditionals to managed cpus
should vanish or all should be covered. This one takes the latter
approach.

---
'managed_policy' is used for the non-smp case in line 941.

Make the symlink code conditional to #ifdef CONFIG_SMP as already
done at other places.

Signed-off-by: Thomas Renninger <trenn@suse.de>

Index: cpufreq/drivers/cpufreq/cpufreq.c
===================================================================
--- cpufreq.orig/drivers/cpufreq/cpufreq.c
+++ cpufreq/drivers/cpufreq/cpufreq.c
@@ -930,6 +930,7 @@ static int cpufreq_add_dev(struct sys_de
 	}
 	spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
+#ifdef CONFIG_SMP
 	/* symlink affected CPUs */
 	for_each_cpu(j, policy->cpus) {
 		if (j == cpu)
@@ -947,6 +948,7 @@ static int cpufreq_add_dev(struct sys_de
 			goto err_out_unregister;
 		}
 	}
+#endif
 
 	policy->governor = NULL; /* to assure that the starting sequence is
 				  * run in cpufreq_set_policy */


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

* Re: [PATCH] cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP
  2009-07-09  8:43 ` [PATCH] cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP Thomas Renninger
@ 2009-07-09  8:48   ` Daniel Mack
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2009-07-09  8:48 UTC (permalink / raw)
  To: Thomas Renninger
  Cc: linux-kernel, Mathieu Desnoyers, Venkatesh Pallipadi, rjw, mingo,
	Shaohua Li, Pekka Enberg, Dave Young, Rusty Russell, sven.wegener,
	cpufreq, Dave Jones

On Thu, Jul 09, 2009 at 10:43:35AM +0200, Thomas Renninger wrote:
> Or like that:
> Either all #ifdef CONFIG_SMP related conditionals to managed cpus
> should vanish or all should be covered. This one takes the latter
> approach.

Dave Jones fixed it already, see

  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e1596f75395e7a402e1059c518e633d2732dcf8

Daniel




> ---
> 'managed_policy' is used for the non-smp case in line 941.
> 
> Make the symlink code conditional to #ifdef CONFIG_SMP as already
> done at other places.
> 
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> 
> Index: cpufreq/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- cpufreq.orig/drivers/cpufreq/cpufreq.c
> +++ cpufreq/drivers/cpufreq/cpufreq.c
> @@ -930,6 +930,7 @@ static int cpufreq_add_dev(struct sys_de
>  	}
>  	spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
>  
> +#ifdef CONFIG_SMP
>  	/* symlink affected CPUs */
>  	for_each_cpu(j, policy->cpus) {
>  		if (j == cpu)
> @@ -947,6 +948,7 @@ static int cpufreq_add_dev(struct sys_de
>  			goto err_out_unregister;
>  		}
>  	}
> +#endif
>  
>  	policy->governor = NULL; /* to assure that the starting sequence is
>  				  * run in cpufreq_set_policy */
> 

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

end of thread, other threads:[~2009-07-09  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 19:24 [PATCH] cpufreq: unbreak build for !CONFIG_SMP Daniel Mack
2009-07-09  8:43 ` [PATCH] cpufreq: Unbreak build for !SMP: symlinked cpus cannot happen for !SMP Thomas Renninger
2009-07-09  8:48   ` Daniel Mack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox