Some other comments: On Thu, Sep 12, 2013 at 02:51:24PM +0800, Fan Rong wrote: > + /* L1RSTDISABLE hold low */ > + pwr_reg = readl(cc_base + AW_CPUCFG_GENCTL); > + pwr_reg &= ~(1<<cpu);
If you pass your patch through checkpatch.pl, it will warn about some of this. You should have one space each side of <<. > + /* step3: clear power-off gating */ > + pwr_reg = readl(cc_base + AW_CPU1_PWROFF_REG); > + pwr_reg &= ~(1); You don't need the parens here. > + pwr_reg = readl(cc_base + AW_CPUCFG_DBGCTL1); > + pwr_reg |= (1<<cpu); Nor here. > +static int sunxi7i_boot_secondary(unsigned int cpu, struct task_struct *idle) > +{ > + pr_debug("[%s] enter cpu %d\n", __func__, cpu); > + spin_lock(&boot_lock); > + enable_aw_cpu(cpu); > + spin_unlock(&boot_lock); What exactly does this spinlock protect? The core code already provides the guarantee that only one CPU will be brought online or taken offline at a time. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/