mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
ARM: l2c: avoid calling outer_flush_all() unnecessarily (Spear)
Spear calls outer_flush_all() from it's SMP bringup function. This is potentially dangerous as the L2C set/way operations which implement this don't take kindly to concurrent operations. Besides, there's better solutions to this, as implemented on other platforms. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
b13b9e98b8
commit
03a166e22a
@ -20,6 +20,18 @@
|
|||||||
#include <mach/spear.h>
|
#include <mach/spear.h>
|
||||||
#include "generic.h"
|
#include "generic.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write pen_release in a way that is guaranteed to be visible to all
|
||||||
|
* observers, irrespective of whether they're taking part in coherency
|
||||||
|
* or not. This is necessary for the hotplug code to work reliably.
|
||||||
|
*/
|
||||||
|
static void write_pen_release(int val)
|
||||||
|
{
|
||||||
|
pen_release = val;
|
||||||
|
smp_wmb();
|
||||||
|
sync_cache_w(&pen_release);
|
||||||
|
}
|
||||||
|
|
||||||
static DEFINE_SPINLOCK(boot_lock);
|
static DEFINE_SPINLOCK(boot_lock);
|
||||||
|
|
||||||
static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
|
static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
|
||||||
@ -30,8 +42,7 @@ static void spear13xx_secondary_init(unsigned int cpu)
|
|||||||
* let the primary processor know we're out of the
|
* let the primary processor know we're out of the
|
||||||
* pen, then head off into the C entry point
|
* pen, then head off into the C entry point
|
||||||
*/
|
*/
|
||||||
pen_release = -1;
|
write_pen_release(-1);
|
||||||
smp_wmb();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Synchronise with the boot thread.
|
* Synchronise with the boot thread.
|
||||||
@ -58,9 +69,7 @@ static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
|||||||
* Note that "pen_release" is the hardware CPU ID, whereas
|
* Note that "pen_release" is the hardware CPU ID, whereas
|
||||||
* "cpu" is Linux's internal ID.
|
* "cpu" is Linux's internal ID.
|
||||||
*/
|
*/
|
||||||
pen_release = cpu;
|
write_pen_release(cpu);
|
||||||
flush_cache_all();
|
|
||||||
outer_flush_all();
|
|
||||||
|
|
||||||
timeout = jiffies + (1 * HZ);
|
timeout = jiffies + (1 * HZ);
|
||||||
while (time_before(jiffies, timeout)) {
|
while (time_before(jiffies, timeout)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user