SPIN_LOCK_UNLOCKED cleanup in arch/arm
Subsystems (6)
RFC PATCH 1/1 SPIN_LOCK_UNLOCKED cleanup in arch/arm
for arch/arm/kernel/smp.c
static DEFINE_PER_CPU(struct ipi_data, ipi_data) = {
will give a struct with name per_cpu__ipi_data
so I did
- .lock = SPIN_LOCK_UNLOCKED, + .lock = __SPIN_LOCK_UNLOCKED(per_cpu__ipi_data.lock),
but this dosen't seem to be the right thing to do.. the DEFINE_PER_CPU macro internally creates an instance of the type passed with name as "per_cpu__##name"
the prefix should not be assumed i think
.if the DEFINE_PER_CPU changes ,this code will break..
how do we go about it?
thoughts!
plz CMIIW
---
kernel/irq.c | 2 +- kernel/smp.c | 2 +- kernel/time.c | 2 +- mach-omap2/gpmc.c | 2 +- mach-pnx4008/dma.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/kernel/irq.c +1 -1
@@ -101,7 +101,7 @@ unlock:/* Handle bad interrupts */ static struct irq_desc bad_irq_desc = { .handle_irq = handle_bad_irq, - .lock =SPIN_LOCK_UNLOCKED + .lock =__SPIN_LOCK_UNLOCKED (bad_irq_desc.lock) };/*
arch/arm/kernel/smp.c +1 -1
@@ -60,7 +60,7 @@ struct ipi_data { }; static DEFINE_PER_CPU(struct ipi_data, ipi_data) = { - .lock =SPIN_LOCK_UNLOCKED , + .lock =__SPIN_LOCK_UNLOCKED (per_cpu__ipi_data.lock), };enum ipi_msg_type {
arch/arm/mach-omap2/gpmc.c +1 -1
@@ -54,7 +54,7 @@static struct resource gpmc_mem_root;static struct resource gpmc_cs_mem[GPMC_CS_NUM ]; -static spinlock_t gpmc_mem_lock =SPIN_LOCK_UNLOCKED ; +static DEFINE_SPINLOCK (gpmc_mem_lock);static unsigned gpmc_cs_map; static void __iomem *gpmc_base =
arch/arm/mach-pnx4008/dma.c +2 -2
@@ -47,7 +47,7 @@ static struct ll_pool {int count; } ll_pool; -static spinlock_t ll_lock =SPIN_LOCK_UNLOCKED ; +static DEFINE_SPINLOCK (ll_lock);struct pnx4008_dma_ll *pnx4008_alloc_ll_entry (dma_addr_t * ll_dma) {
@@ -135,7 +135,7 @@ static inline void dma_decrement_usage(void) } } -static spinlock_t dma_lock =SPIN_LOCK_UNLOCKED ; +static DEFINE_SPINLOCK (dma_lock);static inline void pnx4008_dma_lock (void ) {
arch/arm/kernel/time.c +1 -1
@@ -510,7 +510,7 @@ void __init time_init(void)#ifdef CONFIG_NO_IDLE_HZ if (system_timer->dyn_tick) - system_timer->dyn_tick->lock =SPIN_LOCK_UNLOCKED ; +spin_lock_init (&system_timer->dyn_tick->lock);#endif }
Signature · 1 line
Milind Arun Choudhary