aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2013-10-09 19:27:54 +0800
committerGuodong Xu <guodong.xu@linaro.org>2013-10-09 19:27:54 +0800
commitba94b768e206bc304329b5ee2fc86c46be11102b (patch)
treefc17ddbb5681d875c17f0e8d412b94d1c285a7a7
parent2ee51ffa3128d0a79dab13f423025e6cd9f37220 (diff)
parent036a225d4f3b751ca4acebc75b8b85c3fff89867 (diff)
Merge commit 'tracking-hilt-LOCKDEP-1008' into integration-hilt-lsk-androidintegration-hilt-lsk-android-1009
* commit 'tracking-hilt-LOCKDEP-1008': ARM: 7669/1: keep __my_cpu_offset consistent with generic one gpiolib: remove warnning of allocations with IRQs disabled clk: hi3xxx: initialize spinlock
-rw-r--r--arch/arm/kernel/setup.c7
-rw-r--r--drivers/clk/hisilicon/clk-hi3xxx.c5
-rw-r--r--drivers/gpio/gpiolib.c8
3 files changed, 16 insertions, 4 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 6002fe06b124..1f1eabd7b6be 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -470,6 +470,13 @@ void __init smp_setup_processor_id(void)
for (i = 1; i < nr_cpu_ids; ++i)
cpu_logical_map(i) = i == cpu ? 0 : i;
+ /*
+ * clear __my_cpu_offset on boot CPU to avoid hang caused by
+ * using percpu variable early, for example, lockdep will
+ * access percpu variable inside lock_release
+ */
+ set_my_cpu_offset(0);
+
printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr);
}
diff --git a/drivers/clk/hisilicon/clk-hi3xxx.c b/drivers/clk/hisilicon/clk-hi3xxx.c
index 1e59f2c11f6b..348ba2b179e6 100644
--- a/drivers/clk/hisilicon/clk-hi3xxx.c
+++ b/drivers/clk/hisilicon/clk-hi3xxx.c
@@ -89,7 +89,10 @@ struct hs_clk {
static void __iomem __init *hs_init_clocks(struct device_node *np);
-static struct hs_clk hs_clk;
+static struct hs_clk hs_clk =
+{
+ .lock = __SPIN_LOCK_UNLOCKED(hs_clk.lock),
+};
static int hi3620_clkgate_prepare(struct clk_hw *hw)
{
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index c2534d62911c..ff0fd655729f 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1214,15 +1214,14 @@ int gpiochip_add(struct gpio_chip *chip)
}
}
+ spin_unlock_irqrestore(&gpio_lock, flags);
+
#ifdef CONFIG_PINCTRL
INIT_LIST_HEAD(&chip->pin_ranges);
#endif
of_gpiochip_add(chip);
-unlock:
- spin_unlock_irqrestore(&gpio_lock, flags);
-
if (status)
goto fail;
@@ -1235,6 +1234,9 @@ unlock:
chip->label ? : "generic");
return 0;
+
+unlock:
+ spin_unlock_irqrestore(&gpio_lock, flags);
fail:
/* failures here can mean systems won't boot... */
pr_err("gpiochip_add: gpios %d..%d (%s) failed to register\n",