From patchwork Mon Nov 17 11:48:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 5318411 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E263B9F2ED for ; Mon, 17 Nov 2014 11:51:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24093201BC for ; Mon, 17 Nov 2014 11:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 319422015E for ; Mon, 17 Nov 2014 11:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751135AbaKQLuI (ORCPT ); Mon, 17 Nov 2014 06:50:08 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:45475 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752027AbaKQLsm (ORCPT ); Mon, 17 Nov 2014 06:48:42 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) 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 <0NF600FAGM9TJP90@mailout3.w1.samsung.com>; Mon, 17 Nov 2014 11:51:29 +0000 (GMT) X-AuditID: cbfec7f5-b7f956d000005ed7-2a-5469e095d128 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 8C.BE.24279.590E9645; Mon, 17 Nov 2014 11:48:37 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NF60089VM4TUL60@eusync2.samsung.com>; Mon, 17 Nov 2014 11:48:37 +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, Arnd Bergmann , Olof Johansson , 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 v9 3/7] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Mon, 17 Nov 2014 12:48:25 +0100 Message-id: <1416224909-4290-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1416224909-4290-1-git-send-email-m.szyprowski@samsung.com> References: <1416224909-4290-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsVy+t/xK7pTH2SGGCyYKmrxd9IxdotH8x8z W/QuuMpmcbbpDbvF9s4Z7BZT/ixnstj0+BqrxeVdc9gsZi/pZ7GYcX4fk8Xty7wW57ZvYbFY e+Quu8XS6xeZLE5d/8xmsWrXH0aL/Ve8HAQ91sxbw+jR0tzD5vH71yRGj29fJ7F4XO7rZfJY 9D3LY+esu+wed67tYfPYvKTe48qJJlaPvi2rGD0+b5IL4InisklJzcksSy3St0vgyrj/5RZb wW/OigVf/zE1MG7l6GLk5JAQMJF4OvkOE4QtJnHh3nq2LkYuDiGBpYwSj9eeZYJw+pgkNh/c wgJSxSZgKNH1tosNxBYRcJP4t+4QWAezwGdmiUuP1rCCJIQF0iUmfHgMZrMIqEpc2LQcrIFX wF1i4pJuFoh1chL/X64AW80p4CHx7fsBoBoOoG3uEq2POCcw8i5gZFjFKJpamlxQnJSea6RX nJhbXJqXrpecn7uJERL4X3cwLj1mdYhRgINRiYf3QFFmiBBrYllxZe4hRgkOZiUR3piLQCHe lMTKqtSi/Pii0pzU4kOMTBycUg2MM8Ji81Sn1H+XmH+lu1qy+4j6ywfFjPMPNYjO5WVmXVq/ NmalbEc1i1+5zYQTNuvvnDPzZXk0o/ZS+AoexX2Gn3wasxo3lphfZZTbbLDHoVbEifku7/WW J1cajobOldWoufhzFv9b7/rT5/IvibLw7b4o/vjavttmrPFeC+9pK7+23hfsxB2pxFKckWio xVxUnAgA/gWnJVoCAAA= 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 --- 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)