From patchwork Mon Oct 20 12:54:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungseung Lee X-Patchwork-Id: 5105431 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C4C219F349 for ; Mon, 20 Oct 2014 12:57:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3E60201ED for ; Mon, 20 Oct 2014 12:57:14 +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 B02B020166 for ; Mon, 20 Oct 2014 12:57:13 +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 1XgCTx-0006S3-KF; Mon, 20 Oct 2014 12:54:41 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgCTt-0006Pb-Su for linux-arm-kernel@lists.infradead.org; Mon, 20 Oct 2014 12:54:38 +0000 Received: by mail-pa0-f52.google.com with SMTP id fb1so5071610pad.25 for ; Mon, 20 Oct 2014 05:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=Ym9UQ5hBq4/jqCkXX94cuCVxqCc3mqatS1YVxXIlkgc=; b=bp8mdXvsfKPkxesoVZRpv2tm9NsNWuhciZqdJHSvOduQed6zc1u4W66urbNk/OO9Yz ac/wiP4kfNT5i9jJImnT/Do7eAR8cvoT3Ha2VwDiJfJl7AOyWHekRHLk8Vf6OQ6vGtfc UGs3M1bhVyUuxIaPzuKJCfuh4Ka+IDHmBDWdry9K7b8TBJ4OszSPQkz0y88fFvkBsO2o l9i0eNuC9gfIJfS8Lf9Tl8btPB1RTb/j6WAZzROeFmS2LPwyDjI+58e/gWj9SFs2+CMd Cr15VfDs1/OYYCDLcnrFvzmDVntitFvAccYOMcgSC0InOLZZeMnht96EWjavA2MdLNs6 ya0Q== X-Received: by 10.70.36.202 with SMTP id s10mr27067034pdj.101.1413809656515; Mon, 20 Oct 2014 05:54:16 -0700 (PDT) Received: from localhost.localdomain ([165.132.120.48]) by mx.google.com with ESMTPSA id y2sm9190892pdp.31.2014.10.20.05.54.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Oct 2014 05:54:15 -0700 (PDT) From: Jungseung Lee To: Russell King , Steve Capper , Will Deacon , Jungseung Lee , linux-arm-kernel@lists.infradead.org, Catalin Marinas Subject: [PATCH] arm: fix flush_pfn_alias Date: Mon, 20 Oct 2014 21:54:02 +0900 Message-Id: <1413809642-12931-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-20141020_055438_002801_DBD61BB8 X-CRM114-Status: GOOD ( 11.69 ) X-Spam-Score: -0.8 (/) 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=-3.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, 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"); }