From patchwork Mon Oct 27 11:05:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 39600 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 793942118A for ; Mon, 27 Oct 2014 11:07:20 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gi9sf3936956lab.6 for ; Mon, 27 Oct 2014 04:07:19 -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=hQQoIx7EltFhMM6PBUgWgpeGA2sWhkbA+x+h9/U9UCCTRGo6bJBMBoeeqRZm+34U+s QxPG0twyk01lbyTxLKafeHslkGPKgRDt5XBTq9j/rWfJn7nrEyYgGql2YB5vEr/6gSgS AHhMV9LMRzhjGQD6glUW7saERsdwUEoBY2yUmgRTmPSRrS//Y6TZ3OAy+THyl+yJfufm 4YVnDrBbyj8WnA62lJ6d+hm2lb/RlWfJ8wTJeO6e4ac4Z+f7W2Rc4SgKkG2oCgUJzvJK Kn8BDH4lOjYwefaUCTSibINYssY8KDtmuhbRoVxUjl3DRE+PxRcCNFCUGivl10aFucua /fvQ== X-Gm-Message-State: ALoCoQm6r2eMQVOVhXytT5vQUDLXKbqhPTAD1qyH12WtNjMwc384MghWwdK/8zcu+wB6AKX7ov6U X-Received: by 10.180.105.74 with SMTP id gk10mr5117919wib.0.1414408039333; Mon, 27 Oct 2014 04:07:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.99 with SMTP id r3ls658533lar.73.gmail; Mon, 27 Oct 2014 04:07:19 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr22991186lbb.46.1414408039139; Mon, 27 Oct 2014 04:07:19 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id yf1si19391040lab.63.2014.10.27.04.07.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 04:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id l4so426746lbv.32 for ; Mon, 27 Oct 2014 04:07:19 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr22378177lbb.74.1414408039055; Mon, 27 Oct 2014 04:07:19 -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 c5csp268037lbz; Mon, 27 Oct 2014 04:07:18 -0700 (PDT) X-Received: by 10.70.137.42 with SMTP id qf10mr23277166pdb.100.1414408037534; Mon, 27 Oct 2014 04:07:17 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id og8si10215590pbb.128.2014.10.27.04.07.16 for ; Mon, 27 Oct 2014 04:07:17 -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 S1752192AbaJ0LGG (ORCPT + 26 others); Mon, 27 Oct 2014 07:06:06 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:35498 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbaJ0LGB (ORCPT ); Mon, 27 Oct 2014 07:06:01 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NE300LYDOAR9O10@mailout1.w1.samsung.com>; Mon, 27 Oct 2014 11:08:51 +0000 (GMT) X-AuditID: cbfec7f4-b7f6c6d00000120b-68-544e271526e6 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 4F.3F.04619.5172E445; Mon, 27 Oct 2014 11:05:57 +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 <0NE300JBOO5RPJ10@eusync2.samsung.com>; Mon, 27 Oct 2014 11:05:57 +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, santosh.shilimkar@ti.com, tony@atomide.com, drake@endlessm.com, loeliger@gmail.com, Mark Rutland Subject: [PATCH v6 3/7] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Mon, 27 Oct 2014 12:05:46 +0100 Message-id: <1414407950-3029-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1414407950-3029-1-git-send-email-m.szyprowski@samsung.com> References: <1414407950-3029-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRmVeSWpSXmKPExsVy+t/xK7qi6n4hBge/KFo8mv+Y2aJ3wVU2 i7NNb9gttnfOYLeY8mc5k8Wmx9dYLS7vmsNmMXtJP4vFjPP7mCxuX+a1OLd9C4vF2iN32S2W Xr/IZPG6bw2zxapdfxgt9l/xchDwWDNvDaNHS3MPm8e3r5NYPC739TJ5LPqe5bFz1l12jzvX 9rB5bF5S79G3ZRWjx/Eb25k8Pm+SC+CO4rJJSc3JLEst0rdL4Mq4/+UWW8FvzooFX/8xNTBu 5ehi5OSQEDCRaLx7lBHCFpO4cG89WxcjF4eQwFJGidt/prBDOH1MEicuNDODVLEJGEp0ve1i A7FFBLIlfnybzAJSxCywilliyoF1rCAJYYF0iQmT7rOD2CwCqhJPj89jAbF5Bdwlzp+exAqx Tk7i/8sVTCA2p4CHxOSWmWC2EFDNqg97GScw8i5gZFjFKJpamlxQnJSea6hXnJhbXJqXrpec n7uJERLmX3YwLj5mdYhRgINRiYd3xzTfECHWxLLiytxDjBIczEoivI4/gUK8KYmVValF+fFF pTmpxYcYmTg4pRoYzf7PnrsmnmFZ9pJDXmt3TArkU3ErueWfsdFArkg91/TrOtHl+xKTVa6x N8fJ5hyO5to/9XBR+vor+2ZMnuWcHXl64oyN3TdfRp9ZL2XuLHjmyuHelqP53axzYrqf2Td+ Tf1gOjflvL7sw5Xvqv+IWNg7iu5ZxrlrdvyFTYWZkokGCjOflnoVKbEUZyQaajEXFScCAALa NrdRAgAA 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.173 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)