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: 39731 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4F23024046 for ; Wed, 29 Oct 2014 09:25:45 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf1670845eek.5 for ; Wed, 29 Oct 2014 02:25:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=18ma2mEM6H3GJTNqWVSHXhH1T6fhKUuQ2sMKiQrdcLg=; b=IxSiDlxLJZRwZ7n4AKN37uvfuYCIrSptIqgd8ZN7GI3i3Wsk8SzKaNSZvoO70R7Gpm H5tT2iNquqIA9dUwOaEfr+nXU1A/aM3qAgVPgLb/6/vVsI2pQwunxJhiUJ1uySxDgYv+ IC+bn366PaJp4F/vfZ90AOxKY0TVf1nur7oqnIKPAlB05x9Gp0PQAJP069vPhpiYl/Mf rS3qyqDdlVWjRy5mXA3V2lkMsrS11E0tKTP99jtG/uMFDJi5ScWwvlJZcg6WVtrlDqOL h5tjt+l2pGjo7wodhtaCCj/4lxsb7SSolBk+w5J8RuPs5G1dJQpe7C7DEZhLQsy1e0yu Xleg== X-Gm-Message-State: ALoCoQme21GLokDT8l6fzPy4JwwQRiBrQX5nqyFFOuFQkg+p5V2zJCHtUPBDA5zUbjCUUJ795sCC X-Received: by 10.112.166.2 with SMTP id zc2mr2793lbb.24.1414574744497; Wed, 29 Oct 2014 02:25:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.138 with SMTP id q10ls174563laj.83.gmail; Wed, 29 Oct 2014 02:25:44 -0700 (PDT) X-Received: by 10.152.88.70 with SMTP id be6mr10048919lab.72.1414574744201; Wed, 29 Oct 2014 02:25:44 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id d5si6282960laf.110.2014.10.29.02.25.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 02:25:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id n15so2128262lbi.3 for ; Wed, 29 Oct 2014 02:25:43 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr9832678laz.27.1414574743879; Wed, 29 Oct 2014 02:25:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp624987lbz; Wed, 29 Oct 2014 02:25:42 -0700 (PDT) X-Received: by 10.68.90.34 with SMTP id bt2mr9242601pbb.29.1414574741884; Wed, 29 Oct 2014 02:25:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si3558856pdb.123.2014.10.29.02.25.41 for ; Wed, 29 Oct 2014 02:25:41 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932226AbaJ2JZg (ORCPT + 26 others); 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)