[PATCH v4 08/15] ARM: vexpress: introduce DCSCB support
Nicolas Pitre
nicolas.pitre at linaro.org
Thu Feb 7 13:56:08 EST 2013
On Thu, 7 Feb 2013, Catalin Marinas wrote:
> Hi Nico,
>
> On Tue, Feb 05, 2013 at 05:22:05AM +0000, Nicolas Pitre wrote:
> > +static int dcscb_power_up(unsigned int cpu, unsigned int cluster)
> > +{
> > + unsigned int rst_hold, cpumask = (1 << cpu);
> > +
> > + pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
> > + if (cpu >= 4 || cluster >= 2)
> > + return -EINVAL;
> > +
> > + /*
> > + * Since this is called with IRQs enabled, and no arch_spin_lock_irq
> > + * variant exists, we need to disable IRQs manually here.
> > + */
> > + local_irq_disable();
> > + arch_spin_lock(&dcscb_lock);
> > +
> > + rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
> > + if (rst_hold & (1 << 8)) {
> > + /* remove cluster reset and add individual CPU's reset */
> > + rst_hold &= ~(1 << 8);
> > + rst_hold |= 0xf;
> > + }
> > + rst_hold &= ~(cpumask | (cpumask << 4));
> > + writel(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
>
> Why do you mix relaxed and non-relaxed I/O accessors here? Do you need
> the barriers implied by writel()?
Most likely not. I'll change that.
For the record, this patch is not part of the pull request I sent
recently.
Nicolas
More information about the linux-arm-kernel
mailing list