From patchwork Thu Nov 13 13:18:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 40763 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BFBC3240ED for ; Thu, 13 Nov 2014 13:19:54 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id r20sf3273858wiv.2 for ; Thu, 13 Nov 2014 05:19:54 -0800 (PST) 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=zFh+ZW5j7oEgjHKFCGDKlo7eV0ZW2Pv0+fTqYFKkgts=; b=id29x/FO6rUSyFHslx9Pp8WgdbwLhrEUCoDjWlbf6veYj66pXWw/VejI1duqdz4urb tMWc8aTywFt+lkYBJUK7mYIhqYlIPRhgpRCycPIe7JEBkHuPj+mDhL/tesFTQ9FlwzWk RRZmal/MLL02+KVUBcsYXXL0sbsJe7Iya0oQ3a6QCGh0EIIf2h/Qn/glXPRYm2i+s67E AcZw1qPg5o/51eHbc/KgVA1jFlDPINgZWmohfsXNGb44Lu1HuDcepv6KYMg8hxi3q9S3 KdeQ0e4y61OncC2KCzaw6qrFqAxjZWrROZZCK1aiUlyzyi7w9KwvYsYp4JYZMSEblPmV F/7w== X-Gm-Message-State: ALoCoQm8nbcohwYyYnAPMQVd2jdFgy3jvi+eA2ketBNh1ZSqJFPE8krKWX0BmcntnKapzT9sw7gY X-Received: by 10.112.48.98 with SMTP id k2mr414338lbn.15.1415884794009; Thu, 13 Nov 2014 05:19:54 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.173 with SMTP id p13ls780534lal.84.gmail; Thu, 13 Nov 2014 05:19:53 -0800 (PST) X-Received: by 10.152.19.133 with SMTP id f5mr2312998lae.87.1415884793860; Thu, 13 Nov 2014 05:19:53 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id 6si38308268laj.120.2014.11.13.05.19.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 05:19:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gm9so12998040lab.5 for ; Thu, 13 Nov 2014 05:19:53 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr2444417lbo.32.1415884793517; Thu, 13 Nov 2014 05:19:53 -0800 (PST) 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.184.201 with SMTP id ew9csp587340lbc; Thu, 13 Nov 2014 05:19:52 -0800 (PST) X-Received: by 10.66.227.103 with SMTP id rz7mr2495754pac.45.1415884791635; Thu, 13 Nov 2014 05:19:51 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ng11si19971246pdb.165.2014.11.13.05.19.51 for ; Thu, 13 Nov 2014 05:19:51 -0800 (PST) Received-SPF: none (google.com: linux-omap-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 S933122AbaKMNTi (ORCPT + 5 others); Thu, 13 Nov 2014 08:19:38 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:27097 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932827AbaKMNS0 (ORCPT ); Thu, 13 Nov 2014 08:18:26 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) 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 <0NEZ00MDIBR8F540@mailout4.w1.samsung.com>; Thu, 13 Nov 2014 13:21:08 +0000 (GMT) X-AuditID: cbfec7f5-b7f956d000005ed7-2f-5464af9f99ed Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 1D.B0.24279.F9FA4645; Thu, 13 Nov 2014 13:18:23 +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 <0NEZ00I3CBMFKS20@eusync1.samsung.com>; Thu, 13 Nov 2014 13:18:22 +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 v8 3/7] ARM: l2c: Get outer cache .write_sec callback from mach_desc only if not NULL Date: Thu, 13 Nov 2014 14:18:10 +0100 Message-id: <1415884694-5868-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1415884694-5868-1-git-send-email-m.szyprowski@samsung.com> References: <1415884694-5868-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsVy+t/xy7rz16eEGOxbzGLxd9IxdotH8x8z W/QuuMpmcbbpDbvF9s4Z7BZT/ixnstj0+BqrxeVdc9gsZi/pZ7GYcX4fk8Xty7wW57ZvYbFY e+Quu8XS6xeZLE5d/8xmsWrXH0aL/Ve8HAQ91sxbw+jR0tzD5vH71yRGj29fJ7F4XO7rZfJY 9D3LY+esu+wed67tYfPYvKTe48qJJlaPvi2rGD0+b5IL4InisklJzcksSy3St0vgyrj/5RZb wW/OigVf/zE1MG7l6GLk5JAQMJG4ceYTG4QtJnHh3nowW0hgKaPE5J1SXYxcQHYfk8Sa9mVg CTYBQ4mut11gtoiAm8S/dYfYQIqYBT4zS1x6tIYVJCEskC5xYM0GMJtFQFXi69tW5i5GDg5e AXeJA6vqIZbJSfx/uYIJxOYU8JD4sv4PK8Rid4n2XYcZJzDyLmBkWMUomlqaXFCclJ5rpFec mFtcmpeul5yfu4kREvZfdzAuPWZ1iFGAg1GJh/cDd0qIEGtiWXFl7iFGCQ5mJRHeNyuBQrwp iZVVqUX58UWlOanFhxiZODilGhgnXtx1e0nh7BVsrsWSl8tmTi2YWvWrJuvcsdCUmWtjDpu3 7lFtlm/U27Nsr3sC+0S9Nu8Ff+WvF4bNiHYplbwasOgQQ6uf7Tnboq8X+luV2J/fFKre9F81 vFhH+NcPpxN3c9+GJZ8pWyIVyXev8+ZvlQA21kwt5mnWOryyVvF3DqpNO7gxNU+JpTgj0VCL uag4EQAU+zM3WQIAAA== Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@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.215.46 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)