From patchwork Fri Jul 29 00:48:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9251829 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 C9D9D60757 for ; Fri, 29 Jul 2016 00:51:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB65227E71 for ; Fri, 29 Jul 2016 00:51:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B00BE27F80; Fri, 29 Jul 2016 00:51:22 +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 6E20B27F46 for ; Fri, 29 Jul 2016 00:51:21 +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 1bSvzY-00008N-43; Fri, 29 Jul 2016 00:49:32 +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 1bSvzU-00006j-OO for linux-arm-kernel@lists.infradead.org; Fri, 29 Jul 2016 00:49:29 +0000 Received: by mail-pf0-x244.google.com with SMTP id g202so4505003pfb.1 for ; Thu, 28 Jul 2016 17:49:07 -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=e0FdxG+dR9DW9Skq7blBVIKmHzRq9zcSEDpYyygOXlbRshNJRv0usx/c5taLVKgrzE Fn8N9huz8gdUmyS4uy1Ec/CLMYY+a5ibpZyidLHeQ/UGpSB9ppnkSqGhQ2S+hCZm9hTC Gx1bujkLF8X5sWt7WUXLZPsAs7CNmAjO4D6Avs+TwGWTcxNZjLZ3yfky00fUUbrUiyzG AcJLCmX1F56d9A388m92xiqx5J881SkxAUFvOckyPnGepIh2mVFyNZnYPPQtN2cZJPYT f0RWTxydnEH+fgJX/UHcbpYVPwM+5GswrkiS9u/g8YbKvh+RjFXhA7TieTtNCHn4MyLL rPxg== 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=QgdHhKCzxqxXt+08A0PcEvJs37bQTkjl1iT1Dxar4NpAi1epG55ZPTSW3ju6FbyEPe rcGy+nfTHZZisQ5uZ/wVzNfGDhYE6POE0NRiFcjRjq+1RLJhdyI28wPgIlWKBLGSris9 CcLlBrbCT7EXl1MK5YbgPFnYb3Pmq80nb3NbAjJHAqEkzqfNNMg1+5SQINouaCBBNyUg sj9nv9rzHUF9S6UoXtVQesH3g0YpiKYwWb+RJ7rx+rr1LX/JuTgLCWYXIsyiwAXxY7be VBuOYaMMtMcucwlvRKWBSuok7hTIyAUmZ+iKg+YI3+5WGEI5NwTc1j7aEqFzNIxjf/c9 QZnw== X-Gm-Message-State: AEkoouskSHPPGpAbhNoXemUKtUEWFnjRbAIu11SIKE598lcZH/BK7hkxl3oW/O0mjNBlOg== X-Received: by 10.98.12.200 with SMTP id 69mr64185268pfm.15.1469753347255; Thu, 28 Jul 2016 17:49:07 -0700 (PDT) Received: from squirtle.localdomain.com ([173.226.206.194]) by smtp.gmail.com with ESMTPSA id yt4sm19820805pab.26.2016.07.28.17.49.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 17:49:06 -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: Thu, 28 Jul 2016 17:48:41 -0700 Message-Id: <1469753322-11407-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-20160728_174928_831865_5110D88A X-CRM114-Status: GOOD ( 10.94 ) 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 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"; }