From patchwork Wed Jun 11 15:30:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 4336891 Return-Path: X-Original-To: patchwork-linux-arm@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 47A619F314 for ; Wed, 11 Jun 2014 15:33:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 612A32022A for ; Wed, 11 Jun 2014 15:33:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89A0D20136 for ; Wed, 11 Jun 2014 15:33:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WukUP-0000wL-E6; Wed, 11 Jun 2014 15:31:01 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WukUK-0000o3-IL for linux-arm-kernel@lists.infradead.org; Wed, 11 Jun 2014 15:30:57 +0000 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 <0N7000M2BGEVGJ40@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 11 Jun 2014 16:30:31 +0100 (BST) X-AuditID: cbfec7f4-b7fac6d000006cfe-5c-539876170749 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id DF.B0.27902.71678935; Wed, 11 Jun 2014 16:30:31 +0100 (BST) Received: from AMDC1227.digital.local ([106.116.147.199]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N7000CN5GES3Z00@eusync1.samsung.com>; Wed, 11 Jun 2014 16:30:31 +0100 (BST) From: Tomasz Figa To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/5] ARM: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Wed, 11 Jun 2014 17:30:09 +0200 Message-id: <1402500612-4778-3-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.9.3 In-reply-to: <1402500612-4778-1-git-send-email-t.figa@samsung.com> References: <1402500612-4778-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFLMWRmVeSWpSXmKPExsVy+t/xy7riZTOCDX5MMrDon9bBatG74Cqb xfbOGewWU/4sZ7LY9Pgaq8XlXXPYLGYv6WexmHF+H5PF7cu8Fq/71jBbrJ/xmsVi1a4/jBb7 r3g58Hq0NPeweXz7OonF43JfL5PHzll32T3uXNvD5rF5Sb1H35ZVjB53r79k8jh+YzuTx+dN cgFcUVw2Kak5mWWpRfp2CVwZx/umsRd0c1Ys2nmCrYHxInsXIyeHhICJxOv+XjYIW0ziwr31 QDYXh5DAUkaJg3+3QTl9TBIndu5gAaliE1CT+NzwCKxDREBV4nPbAnaQImaBvcwSZ2bcYARJ CAvES5w6eRxsBQtQ0aJjt4FsDg5eAUeJGTczILbJSfRue8MMYnMKOEk8vdwL1ioEVLJq/UXm CYy8CxgZVjGKppYmFxQnpeca6hUn5haX5qXrJefnbmKEhO+XHYyLj1kdYhTgYFTi4eXQmRYs xJpYVlyZe4hRgoNZSYS3oHBGsBBvSmJlVWpRfnxRaU5q8SFGJg5OqQbGbr8STgmrczyeYfcu PZ9x0bjkxR+345t3HZqx/QiDWOnrNXuCA2/H9j8WfBsjxBgX3qiqIjZjV6Yim8WmKZutt8nc nHvzy6u4qQsum1hujWB+sCWvfXqg85ZpTPZ67/U52qWtaly3q85w5VVfIzLR593sV1ErXknX r5VtUMvYe0NfSuZL7j9fJZbijERDLeai4kQADBJWoT0CAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140611_083056_755691_7D227DF2 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.7 (-----) Cc: Kukjin Kim , Laura Abbott , Tony Lindgren , Linus Walleij , linux-kernel@vger.kernel.org, Tomasz Figa , Santosh Shilimkar , Robin Holt , Russell King , linux-omap@vger.kernel.org, Tomasz Figa , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,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 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 --- 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 2c42576..e7383b9 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -125,7 +125,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)