* [patch 10/16] parisc: Replace old style lock init
[not found] <20091106223547.784916750@linutronix.de>
@ 2009-11-06 22:41 ` Thomas Gleixner
2009-11-08 5:06 ` Kyle McMartin
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Kyle McMartin, linux-parisc
SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-parisc@vger.kernel.org
---
arch/parisc/kernel/smp.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/parisc/kernel/smp.c
===================================================================
--- linux-2.6.orig/arch/parisc/kernel/smp.c
+++ linux-2.6/arch/parisc/kernel/smp.c
@@ -60,8 +60,6 @@ static int smp_debug_lvl = 0;
#define smp_debug(lvl, ...) do { } while(0)
#endif /* DEBUG_SMP */
-DEFINE_SPINLOCK(smp_lock);
-
volatile struct task_struct *smp_init_current_idle_task;
/* track which CPU is booting */
@@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cp
static int parisc_max_cpus __cpuinitdata = 1;
-DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
+static DEFINE_PER_CPU(spinlock_t, ipi_lock);
enum ipi_message_type {
IPI_NOP=0,
@@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
*/
void __init smp_prepare_cpus(unsigned int max_cpus)
{
+ int cpu;
+
+ for_each_possible_cpu(cpu)
+ spin_lock_init(&per_cpu(ipi_lock, cpu));
+
init_cpu_present(cpumask_of(0));
parisc_max_cpus = max_cpus;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 10/16] parisc: Replace old style lock init
2009-11-06 22:41 ` [patch 10/16] parisc: Replace old style lock init Thomas Gleixner
@ 2009-11-08 5:06 ` Kyle McMartin
2009-11-08 16:11 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: Kyle McMartin @ 2009-11-08 5:06 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, Ingo Molnar, Peter Zijlstra, Kyle McMartin, linux-parisc
On Fri, Nov 06, 2009 at 10:41:51PM -0000, Thomas Gleixner wrote:
> SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
> instead.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Kyle McMartin <kyle@mcmartin.ca>
> Cc: linux-parisc@vger.kernel.org
applied with one nit.
>
> -DEFINE_SPINLOCK(smp_lock);
> -
You forgot to mention this was unused. :) Confused me for a while.
cheers, Kyle
> volatile struct task_struct *smp_init_current_idle_task;
>
> /* track which CPU is booting */
> @@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cp
>
> static int parisc_max_cpus __cpuinitdata = 1;
>
> -DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
> +static DEFINE_PER_CPU(spinlock_t, ipi_lock);
>
> enum ipi_message_type {
> IPI_NOP=0,
> @@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
> */
> void __init smp_prepare_cpus(unsigned int max_cpus)
> {
> + int cpu;
> +
> + for_each_possible_cpu(cpu)
> + spin_lock_init(&per_cpu(ipi_lock, cpu));
> +
> init_cpu_present(cpumask_of(0));
>
> parisc_max_cpus = max_cpus;
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 10/16] parisc: Replace old style lock init
2009-11-08 5:06 ` Kyle McMartin
@ 2009-11-08 16:11 ` Thomas Gleixner
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2009-11-08 16:11 UTC (permalink / raw)
To: Kyle McMartin; +Cc: LKML, Ingo Molnar, Peter Zijlstra, linux-parisc
On Sun, 8 Nov 2009, Kyle McMartin wrote:
> On Fri, Nov 06, 2009 at 10:41:51PM -0000, Thomas Gleixner wrote:
> > SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
> > instead.
> >
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Kyle McMartin <kyle@mcmartin.ca>
> > Cc: linux-parisc@vger.kernel.org
>
> applied with one nit.
>
> >
> > -DEFINE_SPINLOCK(smp_lock);
> > -
>
> You forgot to mention this was unused. :) Confused me for a while.
Gah. Wanted to add it to the changelog, but slipped from my mind.
Sorry for the confusion,
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-08 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20091106223547.784916750@linutronix.de>
2009-11-06 22:41 ` [patch 10/16] parisc: Replace old style lock init Thomas Gleixner
2009-11-08 5:06 ` Kyle McMartin
2009-11-08 16:11 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox