From patchwork Tue Jun 28 04:34:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9201783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C68DD60752 for ; Tue, 28 Jun 2016 04:36:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA3CA285E4 for ; Tue, 28 Jun 2016 04:36:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD916285E8; Tue, 28 Jun 2016 04:36:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48357285E4 for ; Tue, 28 Jun 2016 04:36:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHkjs-0006s8-Eq; Tue, 28 Jun 2016 04:35:08 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHkjq-0005gt-8H for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2016 04:35:06 +0000 Received: by mail-pf0-x244.google.com with SMTP id t190so625744pfb.2 for ; Mon, 27 Jun 2016 21:34:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=7pzPOuedGdVJ1jLZEUt+dJoTVvQ5GYpuwsBz6OL5DeU=; b=fQ5T20NdnKwkkZDII8EJm7DAZBFkAcHvh0pxatOfPcCAHtu83rDZxlRODYjJzT0DvC L/HuJOSnMKtCISDmU60lKGScrd2B8if8IlRAitRcScMNSgjnFuewoIu/b66AXu+OUrtq pB+Uoj+citSK5Ekt7GbLttMZiH4p/YNT0Ybx0YKlhulb/PSqNehU7KnUzgfsmR57TesB m2MNZGmeh59SbtjF6S3HlZi1z+YKMyzJ53Q5FhqTm1/VGxmcvr4p+dLlNsYwjiPbhVVp sHEF412yZ617MTSJqyIx5YbIE7Ik0xaW9sCvG/rcF6r9iILPK1M4JK3PEKUlx/hfIzy9 Z1bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7pzPOuedGdVJ1jLZEUt+dJoTVvQ5GYpuwsBz6OL5DeU=; b=PjekOg8N0uiEXRCPf+/Q303FwxjRkZSnhygiQVYMg2kEJaRYSRgFBeUqlFbmNwxjyT ozFmIPhGbrePD/jPfN4YUNoKFJYZIauuAUrBCgI9XC/aBsCHb1XG9HRpf7UXBSfvHodB n01Dn1EpQN7h0mCRb9lBFkKm5h7saODYag/u7PyeMtBngZNC2ViU5hvueN8tQpv6lfgU z62M40QpiXKGqaEls+//yojybknDYwDuLPfim9haJXWCBJGkCkwkSWFjmGEKu3aN9mp4 1m9Brxbn9S/WZ3jB3z5oW9RsMULX7wMW7EcxVafV/IKTZzREkzGxcv/RpVxnzY11Uky9 i/Iw== X-Gm-Message-State: ALyK8tJ507WDs1zSBBhAYK2O4+cePq8uW8mbG0vSoRIk/p+MVX0/s7gd6RwgMzd+LpMIgA== X-Received: by 10.98.107.129 with SMTP id g123mr1495023pfc.62.1467088485533; Mon, 27 Jun 2016 21:34:45 -0700 (PDT) Received: from squirtle.localdomain.localdomain (c-73-225-163-254.hsd1.wa.comcast.net. [73.225.163.254]) by smtp.gmail.com with ESMTPSA id tj10sm3144060pab.21.2016.06.27.21.34.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jun 2016 21:34:45 -0700 (PDT) From: Andrey Smirnov To: linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 1/2] ARM: cache-l2x0.c: Replace magic numbers Date: Mon, 27 Jun 2016 21:34:37 -0700 Message-Id: <1467088477-1095-1-git-send-email-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.5.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160627_213506_353358_23F76BFB X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrey Smirnov , Russell King , linux-kernel@vger.kernel.org, Arnd Bergmann , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Replace magic numbers used for L310 Prefetch Control Register Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov --- arch/arm/mm/cache-l2x0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 9f9d542..30e2012 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -716,8 +716,10 @@ static void __init l2c310_fixup(void __iomem *base, u32 cache_id, revision < L310_CACHE_ID_RTL_R3P2) { u32 val = l2x0_saved_regs.prefetch_ctrl; /* I don't think bit23 is required here... but iMX6 does so */ - if (val & (BIT(30) | BIT(23))) { - val &= ~(BIT(30) | BIT(23)); + if (val & (L310_PREFETCH_CTRL_DBL_LINEFILL | + L310_PREFETCH_CTRL_DBL_LINEFILL_INCR)) { + val &= ~(L310_PREFETCH_CTRL_DBL_LINEFILL | + L310_PREFETCH_CTRL_DBL_LINEFILL_INCR); l2x0_saved_regs.prefetch_ctrl = val; errata[n++] = "752271"; }