[PATCH 4/8] ARM: S5PV310: Add IRQ support
Rabin Vincent
rabin at rab.in
Mon Jun 28 10:47:43 EDT 2010
On Fri, Jun 25, 2010 at 11:27:13PM +0900, Kukjin Kim wrote:
> +static DEFINE_SPINLOCK(irq_controller_lock);
Hmm, why is this lock needed? The uses below don't seem like they need
locking:
> +static void combiner_mask_irq(unsigned int irq)
> +{
> + u32 mask = 1 << (irq % 32);
> +
> + spin_lock(&irq_controller_lock);
> + __raw_writel(mask, combiner_base(irq) + COMBINER_ENABLE_CLEAR);
> + spin_unlock(&irq_controller_lock);
> +}
> +
> +static void combiner_unmask_irq(unsigned int irq)
> +{
> + u32 mask = 1 << (irq % 32);
> +
> + spin_lock(&irq_controller_lock);
> + __raw_writel(mask, combiner_base(irq) + COMBINER_ENABLE_SET);
> + spin_unlock(&irq_controller_lock);
> +}
> +
> +static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
> +{
...
> + spin_lock(&irq_controller_lock);
> + status = __raw_readl(chip_data->base + COMBINER_INT_STATUS);
> + spin_unlock(&irq_controller_lock);
More information about the linux-arm-kernel
mailing list