[PATCH v2] arm: mvebu: don't hardcode a physical address in headsmp.S

Will Deacon will.deacon at arm.com
Thu Jun 6 08:45:02 EDT 2013


On Thu, Jun 06, 2013 at 11:24:28AM +0100, Thomas Petazzoni wrote:
> Now that the coherency_init() function is called a bit earlier, we can
> actually read the physical address of the coherency unit registers
> from the Device Tree, and communicate that to the headsmp.S code,
> which avoids hardcoding a physical address.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> ---
> Changes from v1 to v2:
> 
>  * Simplified the code in headsmp.S to compute the physical address of
>    the coherency unit base address. Suggested by Nicolas Pitre.
> 
>  * Added a sync_cache_w() call to ensure the physical address of the
>    coherency unit stored in the coherency_phys_base is visible by the
>    other CPUs. The other CPUs are reading this before they join the
>    coherency fabric, so we need to make some manual cache coherency
>    here. Noticed by Will Deacon.
> 
>  arch/arm/mach-mvebu/coherency.c | 12 ++++++++++++
>  arch/arm/mach-mvebu/headsmp.S   | 16 ++++++++--------
>  2 files changed, 20 insertions(+), 8 deletions(-)

This looks better to me, cheers.

  Reviewed-by: Will Deacon <will.deacon at arm.com>

Will



More information about the linux-arm-kernel mailing list