[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130912144008.GM12758@n2100.arm.linux.org.uk>
Date: Thu, 12 Sep 2013 15:40:08 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Fan Rong <cinifr@...il.com>
Cc: coosty@....com, maxime.ripard@...e-electrons.com,
daniel.lezcano@...aro.org, tglx@...utronix.de,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
mark.rutland@....com, pawel.moll@....co, rob.herring@...xeda.com,
linux-sunxi@...glegroups.com
Subject: Re: [PATCH 1/4] Add smp support for Allwinner A20(sunxi 7i).
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists