From patchwork Sun Jun 19 00:31:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9185951 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 911976075F for ; Sun, 19 Jun 2016 00:35:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 805B626490 for ; Sun, 19 Jun 2016 00:35:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74CAC2665D; Sun, 19 Jun 2016 00:35:06 +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 3D63F26490 for ; Sun, 19 Jun 2016 00:35:06 +0000 (UTC) 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 1bEQeu-0002Xb-8n; Sun, 19 Jun 2016 00:32:16 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bEQeT-0002El-BO for linux-arm-kernel@lists.infradead.org; Sun, 19 Jun 2016 00:31:50 +0000 Received: by mail-pf0-x244.google.com with SMTP id 66so8797138pfy.1 for ; Sat, 18 Jun 2016 17:31:26 -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:in-reply-to:references; bh=7pzPOuedGdVJ1jLZEUt+dJoTVvQ5GYpuwsBz6OL5DeU=; b=aMfu7dg0TZSJLlrkyBi43+cncSFAj/eWwlPyWYvOH5/ftVOazTlasAfLv9h5ucxdQQ l8wnySHzdfaj7cH3c3kFNi7O/MKysm3V+330a5P+bNDYYh2zLcM3jblMahn96AsTXixX nWFIlMlq3ySfz5zqmg3gSyO5SECVlhK9RkPXdGnUbWEQn5FxrIQelY20UIrKpTrRaIXY BJ4G9JQr6gp7obqrPndLRrz8fLB5A0X/vEoJEdhtOT9lXcX+8TYaPbm4QlMQ+42QnfwP yV3Wzx6llM/LPClN0TYelJ/5zOJkS59QzHkCrLFRbT/SFgaDknWWMF6olEqY3TNGoeze TaMg== 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:in-reply-to :references; bh=7pzPOuedGdVJ1jLZEUt+dJoTVvQ5GYpuwsBz6OL5DeU=; b=munSs8O6Wo1ODMKt4Mb1bigaInhgB2xb/kKJq2kXFqsLWMgJi78Bo7G47ewSzbnmA4 rOc4/wxG4/ky9yj5t8zySLy8lxIhV1uCmFf4m6YWPct2Uu/2bP+8BMFPjjehGHQY8cnC r9a4hi5XqilvQIIr9DJ1/8kNQJmHL8X5AShiJGAM+VTX8saCIE/p1SrBhW4KlwY7YZLp wTYNTcK98TZlduLhLDXLppHVb2oZQVZCAfZD1dCp7Mb4YkSiCdC2HM92kOHftw8nF1WI 6k+242UuzWXVQo0Aow4PdMqK0MJCk1OI5rn03u/IVQIVsO5V2jPBD765cpD4SFRa08f5 V9bQ== X-Gm-Message-State: ALyK8tLpznna23WCLW6K6dViHgQGNfSUHATZmyYNJBqdw2BWjyptLQUVqViymJs9QNRvMw== X-Received: by 10.98.80.79 with SMTP id e76mr12122420pfb.67.1466296286422; Sat, 18 Jun 2016 17:31:26 -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 uj5sm56195069pac.28.2016.06.18.17.31.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Jun 2016 17:31:25 -0700 (PDT) From: Andrey Smirnov To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] ARM: cache-l2x0.c: Replace magic numbers Date: Sat, 18 Jun 2016 17:31:02 -0700 Message-Id: <1466296268-27099-2-git-send-email-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466296268-27099-1-git-send-email-andrew.smirnov@gmail.com> References: <1466296268-27099-1-git-send-email-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160618_173149_512132_F1284E27 X-CRM114-Status: GOOD ( 11.80 ) 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"; }