1
0
Fork 0

LF-980 arch/arm64: use TKT340553_SW_WORKAROUND only for IMX_SCU_SOC

The patch fixes a linkage issue if IMX is not enabled in config.  The
definition of TKT340553_SW_WORKAROUND depends on CONFIG_IMX_SCU_SOC, but
its usage in arch/arm64 code did not.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Tested-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
(cherry picked from commit 272cb97a0343176f098b9a6705b90c121433d920)
5.4-rM2-2.2.x-imx-squashed
Alex Marginean 2020-02-20 13:39:44 +02:00 committed by Jason Liu
parent 42c2753d88
commit 1c1b132b4b
4 changed files with 18 additions and 0 deletions

View File

@ -15,7 +15,11 @@
#include <asm/cputype.h>
#include <asm/mmu.h>
#ifdef CONFIG_IMX_SCU_SOC
extern bool TKT340553_SW_WORKAROUND;
#else
#define TKT340553_SW_WORKAROUND 0
#endif
/*
* Raw TLBI operations.

View File

@ -565,7 +565,12 @@ init_cpu_hwcaps_indirect_list_from_array(const struct arm64_cpu_capabilities *ca
}
}
#ifdef CONFIG_IMX_SCU_SOC
extern bool TKT340553_SW_WORKAROUND;
#else
#define TKT340553_SW_WORKAROUND 0
#endif
static void __init init_cpu_hwcaps_indirect_list(void)
{
init_cpu_hwcaps_indirect_list_from_array(arm64_features);

View File

@ -448,7 +448,12 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
} \
} while (0)
#ifdef CONFIG_IMX_SCU_SOC
extern bool TKT340553_SW_WORKAROUND;
#else
#define TKT340553_SW_WORKAROUND 0
#endif
static void user_cache_maint_handler(unsigned int esr, struct pt_regs *regs)
{
unsigned long address;

View File

@ -16,7 +16,11 @@ struct tlb_inv_context {
u64 sctlr;
};
#ifdef CONFIG_IMX_SCU_SOC
extern bool TKT340553_SW_WORKAROUND;
#else
#define TKT340553_SW_WORKAROUND 0
#endif
static void __hyp_text __tlb_switch_to_guest_vhe(struct kvm *kvm,
struct tlb_inv_context *cxt)