diff options
Diffstat (limited to 'arch/arm/mm/cache-l2x0.c')
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index c61996c256cc..cc12905ae6f8 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -597,17 +597,16 @@ static void l2c310_configure(void __iomem *base) | |||
597 | L310_POWER_CTRL); | 597 | L310_POWER_CTRL); |
598 | } | 598 | } |
599 | 599 | ||
600 | static int l2c310_cpu_enable_flz(struct notifier_block *nb, unsigned long act, void *data) | 600 | static int l2c310_starting_cpu(unsigned int cpu) |
601 | { | 601 | { |
602 | switch (act & ~CPU_TASKS_FROZEN) { | 602 | set_auxcr(get_auxcr() | BIT(3) | BIT(2) | BIT(1)); |
603 | case CPU_STARTING: | 603 | return 0; |
604 | set_auxcr(get_auxcr() | BIT(3) | BIT(2) | BIT(1)); | 604 | } |
605 | break; | 605 | |
606 | case CPU_DYING: | 606 | static int l2c310_dying_cpu(unsigned int cpu) |
607 | set_auxcr(get_auxcr() & ~(BIT(3) | BIT(2) | BIT(1))); | 607 | { |
608 | break; | 608 | set_auxcr(get_auxcr() & ~(BIT(3) | BIT(2) | BIT(1))); |
609 | } | 609 | return 0; |
610 | return NOTIFY_OK; | ||
611 | } | 610 | } |
612 | 611 | ||
613 | static void __init l2c310_enable(void __iomem *base, unsigned num_lock) | 612 | static void __init l2c310_enable(void __iomem *base, unsigned num_lock) |
@@ -678,10 +677,10 @@ static void __init l2c310_enable(void __iomem *base, unsigned num_lock) | |||
678 | power_ctrl & L310_STNDBY_MODE_EN ? "en" : "dis"); | 677 | power_ctrl & L310_STNDBY_MODE_EN ? "en" : "dis"); |
679 | } | 678 | } |
680 | 679 | ||
681 | if (aux & L310_AUX_CTRL_FULL_LINE_ZERO) { | 680 | if (aux & L310_AUX_CTRL_FULL_LINE_ZERO) |
682 | set_auxcr(get_auxcr() | BIT(3) | BIT(2) | BIT(1)); | 681 | cpuhp_setup_state(CPUHP_AP_ARM_L2X0_STARTING, |
683 | cpu_notifier(l2c310_cpu_enable_flz, 0); | 682 | "AP_ARM_L2X0_STARTING", l2c310_starting_cpu, |
684 | } | 683 | l2c310_dying_cpu); |
685 | } | 684 | } |
686 | 685 | ||
687 | static void __init l2c310_fixup(void __iomem *base, u32 cache_id, | 686 | static void __init l2c310_fixup(void __iomem *base, u32 cache_id, |