From patchwork Wed Jan 7 11:30:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 5584031 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1882CBF6C3 for ; Wed, 7 Jan 2015 11:32:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E4DE2025B for ; Wed, 7 Jan 2015 11:32:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 809AF2026F for ; Wed, 7 Jan 2015 11:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751717AbbAGLca (ORCPT ); Wed, 7 Jan 2015 06:32:30 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:61569 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752673AbbAGLaf (ORCPT ); Wed, 7 Jan 2015 06:30:35 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHT00CMI1HP7110@mailout3.w1.samsung.com>; Wed, 07 Jan 2015 11:34:37 +0000 (GMT) X-AuditID: cbfec7f4-b7f126d000001e9a-b6-54ad18d99434 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id E5.07.07834.9D81DA45; Wed, 07 Jan 2015 11:30:33 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NHT00KW81APYS90@eusync3.samsung.com>; Wed, 07 Jan 2015 11:30:33 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Tomasz Figa , Kyungmin Park , linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, Arnd Bergmann , Olof Johansson , Russell King - ARM Linux , Kukjin Kim , lauraa@codeaurora.org, linus.walleij@linaro.org, tony@atomide.com, drake@endlessm.com, loeliger@gmail.com, Mark Rutland , nm@ti.com, khilman@linaro.org Subject: [PATCH v12 5/9] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Wed, 07 Jan 2015 12:30:20 +0100 Message-id: <1420630224-8887-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1420630224-8887-1-git-send-email-m.szyprowski@samsung.com> References: <1420630224-8887-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRmVeSWpSXmKPExsVy+t/xq7o3JdaGGJz8pG3xd9IxdotH8x8z W/QuuMpm8fXwCkaLs01v2C22d85gt5jyZzmTxabH11gtLu+aw2Yxe0k/i8WM8/uYLG5f5rU4 t30Li8XaI3fZLZZev8hk8ebHWSaLU9c/s1ms2vWH0WL/FS8HYY8189YwerQ097B5/P41idHj 29dJLB6X+3qZPBZ9z/LYOesuu8eda3vYPDYvqfe4cqKJ1aNvyypGj+M3tjN5fN4kF8AbxWWT kpqTWZZapG+XwJVxv/Msa8EXroqXM3+xNDDO5+xi5OSQEDCRWPL2PAuELSZx4d56ti5GLg4h gaWMEr+ONjNDOH1MEn/717KDVLEJGEp0ve1iA7FFBNwk/q07BNbBLDCNRWLTkfNAHRwcwgIZ EhsOC4LUsAioSrx9fZEVxOYVcJc4feUM1DY5if8vVzCB2JwCHhJ3zi8Ds4WAahZMXMk2gZF3 ASPDKkbR1NLkguKk9FxDveLE3OLSvHS95PzcTYyQuPiyg3HxMatDjAIcjEo8vAV9a0KEWBPL iitzDzFKcDArifC++QUU4k1JrKxKLcqPLyrNSS0+xMjEwSnVwMiaWrhCXfFxQ1Ef970zpp7r FGPkY39dc3nRuFC8i+ltkLHmizWrvvdfXG1dlbMw7f8x/fKlO1vjT60tlMt9bhaxcC23yq9U Yf025WCGmD/Zn2a9/pJm+t4m2/X5spthWREplv8sOTwCLgjM9ln0vsGs4U6w+pKVuwxfZ/+P W2/Sb+oqn7TnmBJLcUaioRZzUXEiAOsv46hpAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Tested-by: Nishanth Menon Acked-by: Nishanth Menon Acked-by: Tony Lindgren --- 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 ad857bada96c..350f188c92d2 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)