From patchwork Wed Oct 29 09:22:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 5185721 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DFAE3C11AC for ; Wed, 29 Oct 2014 09:26:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 202F5201EF for ; Wed, 29 Oct 2014 09:26:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00637200DF for ; Wed, 29 Oct 2014 09:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932137AbaJ2JZg (ORCPT ); Wed, 29 Oct 2014 05:25:36 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:46382 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756151AbaJ2JXQ (ORCPT ); Wed, 29 Oct 2014 05:23:16 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NE700D9M8V86760@mailout4.w1.samsung.com>; Wed, 29 Oct 2014 09:25:56 +0000 (GMT) X-AuditID: cbfec7f4-b7f6c6d00000120b-e0-5450b1feae47 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id C7.04.04619.EF1B0545; Wed, 29 Oct 2014 09:23:10 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NE700DWE8QECT50@eusync1.samsung.com>; Wed, 29 Oct 2014 09:23:10 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Tomasz Figa , Kyungmin Park , Russell King - ARM Linux , Kukjin Kim , lauraa@codeaurora.org, linux-omap@vger.kernel.org, linus.walleij@linaro.org, tony@atomide.com, drake@endlessm.com, loeliger@gmail.com, Mark Rutland Subject: [PATCH v7 3/8] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Wed, 29 Oct 2014 10:22:56 +0100 Message-id: <1414574581-2320-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1414574581-2320-1-git-send-email-m.szyprowski@samsung.com> References: <1414574581-2320-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrELMWRmVeSWpSXmKPExsVy+t/xy7r/NgaEGKzeKWHxaP5jZoveBVfZ LM42vWG32N45g91iyp/lTBabHl9jtbi8aw6bxewl/SwWM87vY7K4fZnX4tz2LSwWa4/cZbdY ev0ik8WqXX8YLfZf8XLg91gzbw2jR0tzD5vHt6+TWDwu9/UyeSz6nuWxc9Zddo871/aweWxe Uu/Rt2UVo8fnTXIBXFFcNimpOZllqUX6dglcGfe/3GIr+M1ZseDrP6YGxq0cXYycHBICJhLt G5cwQ9hiEhfurWfrYuTiEBJYyihxq2UFO0hCSKCPSeLZrzIQm03AUKLrbRcbiC0ikC3x49tk FpAGZoE+Zonz03vAJgkLpEs867zKAmKzCKhKvJ94F8jm4OAVcJf4+FoWYpmcxP+XK5hAbE4B D4nVF5awQexyl9h4uJttAiPvAkaGVYyiqaXJBcVJ6bmGesWJucWleel6yfm5mxgh4fxlB+Pi Y1aHGAU4GJV4eDV2+4cIsSaWFVfmHmKU4GBWEuHdYR4QIsSbklhZlVqUH19UmpNafIiRiYNT qoGR7z9jWV3VsWui1/JE9h1nZHdNLdUNS1FnTHXn3Vt6ZmePqp9y6p0Jew9OkfHdZtn4eTu7 rJXN/i8LPXmVjq0U/BJ8ouJ4s4nugQPXv5xqWWJoMS980+E1c1xdm2S/h7/IZo2o+dZnfuxk x4eGP1Iez5a/3sSrHpc+M6L//7PwTZ++b/l07IWZEktxRqKhFnNRcSIAqkhKBUUCAAA= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tomasz Figa 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 --- arch/arm/kernel/irq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 7c81ec428b9b..5acb8aef6f2d 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -108,7 +108,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)