From patchwork Tue Oct 21 01:42:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jungseung Lee X-Patchwork-Id: 5108651 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 13ABD9F30B for ; Tue, 21 Oct 2014 01:45:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 167FF2020F for ; Tue, 21 Oct 2014 01:45:47 +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 3EA12201F7 for ; Tue, 21 Oct 2014 01:45:46 +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 1XgOTH-000445-MJ; Tue, 21 Oct 2014 01:42:47 +0000 Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgOTC-00043a-QP for linux-arm-kernel@lists.infradead.org; Tue, 21 Oct 2014 01:42:44 +0000 Received: by mail-pd0-f174.google.com with SMTP id y13so264930pdi.5 for ; Mon, 20 Oct 2014 18:42:20 -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=fiaFJ1b6VFBUt9m397GcL+8igXOnZrV+4HI8cgR6jNw=; b=USittm34uQroFtsJEAjd5kWKWBJ9otVe0XY1K3D2pacuVKyEg4TaTMxnXEn+l430p3 7uo9lFdlEy/5qizePAGFVKTvgnl8RvDqFl3TIALYLrPdWqifXbl7USS0j3ZMXEHsIu1W DI3LD/nKz44ndV/RcgJ2JP2pR4aQaG4rdb9P6inGqdHO3xSi2O06VzBFcqdjPCfLYYZj nu5dYz4yAFVsS6zucddArNxjjzy9lLNxSZ4QiHZBuYBOlw9JM2rfHqgPLbgt9a0M8e3g U0Jy4+F0q+rM6m80swriKilU54rfeh11Id7ESNbO7FJyXYM0oH46WLSIfhKeiWLQG94o OBnA== X-Received: by 10.66.237.165 with SMTP id vd5mr31664570pac.34.1413855740133; Mon, 20 Oct 2014 18:42:20 -0700 (PDT) Received: from localhost.localdomain ([112.150.44.91]) by mx.google.com with ESMTPSA id yp10sm10386361pac.18.2014.10.20.18.42.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Oct 2014 18:42:19 -0700 (PDT) From: Jungseung Lee To: linux-arm-kernel@lists.infradead.org, Russell King , Steve Capper , Will Deacon , Catalin Marinas Subject: [PATCH] ARM: mm: fix discard_old_kernel_data Date: Tue, 21 Oct 2014 10:42:05 +0900 Message-Id: <1413855725-3353-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_184242_905441_060BCECA X-CRM114-Status: GOOD ( 11.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=-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 value 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/copypage-v6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index b9bcc9d..7042334 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c @@ -62,7 +62,7 @@ static void discard_old_kernel_data(void *kto) __asm__("mcrr p15, 0, %1, %0, c6 @ 0xec401f06" : : "r" (kto), - "r" ((unsigned long)kto + PAGE_SIZE - L1_CACHE_BYTES) + "r" ((unsigned long)kto + PAGE_SIZE - 1) : "cc"); }