From patchwork Wed Sep 24 11:05:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 37807 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C9513202DB for ; Wed, 24 Sep 2014 11:08:03 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id t60sf3445397wes.1 for ; Wed, 24 Sep 2014 04:08:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=aMo+/QPirhoaZQu5ImNra47og/4nXvaRHlk1eBR6wtI=; b=SWb4mw+s88OKTewFODplPpI7PhDWK/UHjJPcJVHVhwpm1XbV06+Mjy5WUWIhhaWOUY Tkx5c71C7HBfvZU7o15nh0rxk2C3i8d4DdeaFzOQnjLif9RZa4xC+UI5U3sym0wwEBVV SRYss4wO1K85hHBmQC/q3if/u4WQrtbXN2nRkPYT8+YfcsZEme3zMUGMo7FqfTHpAhBg oP1Ki6RcOSAfJc7+mOuzNRYWGQ77JP3LbsA+TrB27oDNE3eyiOAytnJPjBopXheOBR+n 4my3OXyxy4oaYYN3VbYdX9ZDtGvWL0i20fvl/nbpPcEgAXSVu4c3xDCUwL8rb/ecKN7d 6kJg== X-Gm-Message-State: ALoCoQlIrUUiYX+DLuEouyYrlUqGFN5qgibwDUeCPCEgJgwdROb6AiiQGBrYljI/2INzUa3saWJ7 X-Received: by 10.181.25.225 with SMTP id it1mr1676473wid.0.1411556883041; Wed, 24 Sep 2014 04:08:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.129 with SMTP id o1ls141346lal.75.gmail; Wed, 24 Sep 2014 04:08:02 -0700 (PDT) X-Received: by 10.112.168.38 with SMTP id zt6mr5387657lbb.60.1411556882889; Wed, 24 Sep 2014 04:08:02 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id uo9si22317974lbb.134.2014.09.24.04.08.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 04:08:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id pn19so10441577lab.36 for ; Wed, 24 Sep 2014 04:08:02 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr5225144lbh.67.1411556882824; Wed, 24 Sep 2014 04:08:02 -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.130.169 with SMTP id of9csp562477lbb; Wed, 24 Sep 2014 04:08:01 -0700 (PDT) X-Received: by 10.70.87.169 with SMTP id az9mr10596179pdb.63.1411556879762; Wed, 24 Sep 2014 04:07:59 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id md3si25738677pdb.135.2014.09.24.04.07.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Sep 2014 04:07:59 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1XWkPA-0002di-RU; Wed, 24 Sep 2014 11:06:40 +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 1XWkOj-0002Lv-Oz for linux-arm-kernel@lists.infradead.org; Wed, 24 Sep 2014 11:06:14 +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 <0NCE00FG4KAGD370@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 24 Sep 2014 12:08:40 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-3b-5422a58cdfa2 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 9A.81.25543.C85A2245; Wed, 24 Sep 2014 12:05:48 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NCE00JS4K5ISSA0@eusync4.samsung.com>; Wed, 24 Sep 2014 12:05:48 +0100 (BST) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v5 3/7] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Wed, 24 Sep 2014 13:05:37 +0200 Message-id: <1411556741-5810-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1411556741-5810-1-git-send-email-m.szyprowski@samsung.com> References: <1411556741-5810-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMLMWRmVeSWpSXmKPExsVy+t/xa7o9S5VCDA7u1bd4NP8xs0Xvgqts Fmeb3rBbbO+cwW4x5c9yJotNj6+xWlzeNYfNYvaSfhaLGef3MVncvsxrcW77FhaLtUfuslu8 7lvDbLFq1x9Gi/1XvBz4PVqae9g8vn2dxOJxua+XyWPR9yyPnbPusnvcubaHzWPzknqPvi2r GD2O39jO5PF5k1wAVxSXTUpqTmZZapG+XQJXxrdPt9kLfnNWzL1zg6WBcStHFyMnh4SAicSu phtsELaYxIV764FsLg4hgaWMEnsm/meHcPqYJFZP2g9WxSZgKNH1tgvMFhHIlvjxbTILSBGz QCuzxOMn31hBEsIC6RIX9m1iBLFZBFQlZn9aABbnFXCX+H/gBgvEOjmJ/y9XMIHYnAIeEo8f /wOq5wDa5i7RtMllAiPvAkaGVYyiqaXJBcVJ6bmGesWJucWleel6yfm5mxghAf1lB+PiY1aH GAU4GJV4eCeIK4UIsSaWFVfmHmKU4GBWEuF91QMU4k1JrKxKLcqPLyrNSS0+xMjEwSnVwFhR f+c6x1TXyVelAv31Nq77OEnrRZHGmej1W7d2t78tNg5a+7zpXMr+wK+69ctDzqsyrDP1s5XO 0xacxJnCrpR/5caqWWJ8jduDWPe3+AZach2uKjd2r/coy+lk3Flsz3yNU0p3hdmripXSdkl1 vyYZzPu9p/u5apd0w6+tfOtr1A7rHTDfqMRSnJFoqMVcVJwIAN2Ya49GAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140924_040613_990764_939F0D90 X-CRM114-Status: GOOD ( 10.74 ) X-Spam-Score: -5.7 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.13 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.13 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Kukjin Kim , lauraa@codeaurora.org, tony@atomide.com, linus.walleij@linaro.org, Tomasz Figa , drake@endlessm.com, loeliger@gmail.com, Kyungmin Park , santosh.shilimkar@ti.com, Russell King - ARM Linux , linux-omap@vger.kernel.org, Marek Szyprowski 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+patch=linaro.org@lists.infradead.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.215.49 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 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 5c4d38e32a51..015152a780df 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)