Skip to content

Commit

Permalink
parisc: Replace old style lock init in smp.c
Browse files Browse the repository at this point in the history
SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
instead.

(Also kills the unused smp_lock --kyle)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
  • Loading branch information
Thomas Gleixner authored and Kyle McMartin committed Dec 16, 2009
1 parent 8f78df8 commit 6ad6c42
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/parisc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ 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 */
static volatile int cpu_now_booting __cpuinitdata;

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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6ad6c42

Please sign in to comment.