linux/arch/arm/mach-mvebu
Ard Biesheuvel 0b58725fb9 ARM: mvebu: drop pointless check for coherency_base
The MMU off code path in ll_get_coherency_base() attempts to decide
whether the coherency fabric is mapped by testing the value of
coherency_base, which carries its virtual address if its mapped, and
0x0 otherwise.

However, what the code actually does is take the virtual address of
the coherency_base symbol, and compare it with 0x0, which are never
equal, and so the branch is never taken. In fact, with the MMU off,
dereferencing the VA of coherency_base is not possible to begin with,
nor can its value be relied upon with the MMU off since it is not
cleaned to the Dcache as is done with coherency_phys_base in
armada_370_coherency_init().

Instead, the value of coherency_phys_base is returned, which results
in the correct behavior since it will be 0x0 as well if the coherency
fabric is not mapped, and it is accessible with the MMU off. So just
drop the comparison and the branch.

Fixes: 30cdef9710 ("ARM: mvebu: make the coherency_ll.S functions work with no coherency fabric")
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
2020-09-24 10:19:06 +02:00
..
armada-370-xp.h ARM: use const and __initconst for smp_operations 2015-12-01 22:17:45 +01:00
board-v7.c ARM: mvebu: drop return from void function 2019-04-30 09:05:44 +02:00
coherency_ll.S ARM: mvebu: drop pointless check for coherency_base 2020-09-24 10:19:06 +02:00
coherency.c cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
coherency.h mvebu: add definition for coherency_base 2016-06-16 11:24:47 +02:00
common.h ARM: mvebu: Add standby support 2015-07-25 17:17:05 +02:00
cpu-reset.c mvebu: fix missing include of common.h in cpu-reset.c 2016-06-16 11:24:19 +02:00
dove.c arm: Remove unnecessary of_platform_populate with default match table 2016-06-23 14:58:37 -05:00
headsmp-a9.S Remove __cpuinit macros and users. 2015-07-02 09:54:14 -07:00
headsmp.S ARM: mvebu: Split low level functions to manipulate HW coherency 2014-05-08 16:18:54 +00:00
Kconfig ARM: mvebu: Drop unneeded select of HAVE_SMP 2020-05-15 23:27:38 +02:00
kirkwood-pm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 406 2019-06-05 17:37:13 +02:00
kirkwood-pm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 406 2019-06-05 17:37:13 +02:00
kirkwood.c Merge tag 'mvebu-arm-5.2-1' of git://git.infradead.org/linux-mvebu into arm/late 2019-05-16 10:53:23 -07:00
kirkwood.h ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mvebu-soc-id.c ARM: mvebu: Use system controller to get the soc id when possible 2014-06-30 17:40:59 +00:00
mvebu-soc-id.h ARM: mvebu: Update the SoC ID and revision definitions 2015-01-09 09:22:53 -06:00
platsmp-a9.c ARM: use const and __initconst for smp_operations 2015-12-01 22:17:45 +01:00
platsmp.c ARM: mvebu: convert secondary CPU clock sync to hotplug state 2018-06-27 08:40:29 +02:00
pm-board.c ARM: mvebu: fix a leaked reference by adding missing of_node_put 2019-04-30 09:05:39 +02:00
pm.c ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol 2017-02-28 11:06:10 +00:00
pmsu_ll.S ARM: mvebu: prefix coprocessor operand with p 2019-04-30 09:05:44 +02:00
pmsu.c ARM: mvebu: declare asm symbols as character arrays in pmsu.c 2018-06-27 08:15:12 +02:00
pmsu.h mvebu SoC suspend changes for v3.19 2014-12-04 16:46:43 +01:00
system-controller.c ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol 2017-02-28 11:06:10 +00:00