From patchwork Thu Nov 20 11:08:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungseung Lee X-Patchwork-Id: 5347471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87115C11AC for ; Thu, 20 Nov 2014 11:10:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C06A32021B for ; Thu, 20 Nov 2014 11:10:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E98F3201BC for ; Thu, 20 Nov 2014 11:10:55 +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 1XrPbe-00017q-8W; Thu, 20 Nov 2014 11:08:58 +0000 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrPbM-0000p8-B2 for linux-arm-kernel@lists.infradead.org; Thu, 20 Nov 2014 11:08:40 +0000 Received: by mail-pa0-f41.google.com with SMTP id rd3so2386868pab.0 for ; Thu, 20 Nov 2014 03:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Ym9UQ5hBq4/jqCkXX94cuCVxqCc3mqatS1YVxXIlkgc=; b=Bk6VdCwLxSnwVMRfkUI7i9m5MFMX91GEshMVAUzCbwn52pMYNvM5TsaYGbMmpnK7FT 6jxcAovt64Au+n0zrwzklorqvb9MDWr2AtBfxlY5r1suzJCjAjiwSAR4JrNoLRsQlYjO Ybj2iZUdAY+Qjx0aihOqwplRjmC5jgwBz213Rqglv6QDhQ76HEq/eY69nHjtY8HM+UEn bn4RHws3vjwgxU5ljd5zxxhKXjer9kDXiH4UGjHt2tNCw8VYTw3Fu43RpP/vT7tgVXJL ljbNWuIo2Ey1mZ7FVtnWIoRce+hZnBQ14oliBOieZBILH4Zuf28uBUtcFcRGKWar/qL+ KbGw== X-Received: by 10.70.91.71 with SMTP id cc7mr55410187pdb.79.1416481699375; Thu, 20 Nov 2014 03:08:19 -0800 (PST) Received: from localhost.localdomain ([165.132.120.48]) by mx.google.com with ESMTPSA id cc2sm1767518pbd.62.2014.11.20.03.08.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Nov 2014 03:08:18 -0800 (PST) From: Jungseung Lee To: Russell King , Catalin Marinas , Ard Biesheuvel , Laura Abbott , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH RESEND] arm: fix flush_pfn_alias Date: Thu, 20 Nov 2014 20:08:12 +0900 Message-Id: <1416481692-23764-1-git-send-email-js07.lee@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141120_030840_425890_95C9010A X-CRM114-Status: GOOD ( 10.93 ) X-Spam-Score: -0.8 (/) Cc: Jungseung Lee X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP L1_CACHE_BYTES could be larger than real L1 cache line size. In that case, flush_pfn_alias function would omit to flush last bytes as much as L1_CACHE_BYTES - real cache line size. So fix end address to "to + PAGE_SIZE - 1". The bottom bits of the address is LINELEN. that is ignored by mcrr. Signed-off-by: Jungseung Lee --- arch/arm/mm/flush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 265b836..34b66af 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -33,7 +33,7 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) asm( "mcrr p15, 0, %1, %0, c14\n" " mcr p15, 0, %2, c7, c10, 4" : - : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES), "r" (zero) + : "r" (to), "r" (to + PAGE_SIZE - 1), "r" (zero) : "cc"); }