From: Tomasz Figa Date: Thu, 8 Jan 2015 06:51:45 +0000 (+0100) Subject: ARM: 8261/1: l2c: Get outer cache .write_sec callback from mach_desc only if not... X-Git-Tag: v4.14-rc1~5964^2~1^3~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c4c2edcaeee323fcc4f41a862456358eda50b57;p=platform%2Fkernel%2Flinux-rpi.git ARM: 8261/1: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Certain platforms (i.e. Exynos) might need to set .write_sec callback from firmware initialization which is happenning in .init_early callback of machine descriptor. However current code will overwrite the pointer with whatever is present in machine descriptor, even though it can be already set earlier. This patch fixes this by making the assignment conditional, depending on whether current .write_sec callback is NULL. Signed-off-by: Tomasz Figa Signed-off-by: Marek Szyprowski Tested-by: Nishanth Menon Acked-by: Nishanth Menon Acked-by: Tony Lindgren Signed-off-by: Russell King --- diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index ad857bad..350f188 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -109,7 +109,8 @@ void __init init_IRQ(void) if (IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_CACHE_L2X0) && (machine_desc->l2c_aux_mask || machine_desc->l2c_aux_val)) { - outer_cache.write_sec = machine_desc->l2c_write_sec; + if (!outer_cache.write_sec) + outer_cache.write_sec = machine_desc->l2c_write_sec; ret = l2x0_of_init(machine_desc->l2c_aux_val, machine_desc->l2c_aux_mask); if (ret)