From patchwork Mon Dec 16 15:03:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 22519 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8FCE923FC6 for ; Mon, 16 Dec 2013 15:03:58 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf4303517qae.7 for ; Mon, 16 Dec 2013 07:03:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=r7MHtSwnHyX4MN9DxqOwtwlYtJIaRlogEilRf0JtYx4=; b=Q3NDt4bcsskQZVlYmexjkwxiCsBcUiqd8BCdYxbdK7p80cd9OpT+BwwCEnra3IQjEd YjZ9X9/MqssOSu4rQ6Zatyoe+R/z4EPfvfoI+dnFNY/gjz0FADLJghZXKL+n1TIC2G5G qKTpInlA7BQvnKHQZlhA9UnunhG6RFWo5V88zwHS5xX6EzkXpynqXwCWjd5KtCxWdvZ7 jdFGdERAEj1L4sTCBnM4FK/fMxBATO0wia0+YpofbMdQOtbKRS4+v5UVIz2lDQXyDaIq NcpPmi2U1mN8hEKJ/7bsrYRS4mVJQqOfQDKw8U1fd0Qdk5HbR3ApCTN/16c4TsfG9+dZ ofTA== X-Gm-Message-State: ALoCoQllFw5yKAjQtQOHO2c4pZK0DoU6pT+T0dd9z2lkC8pGHidHi4O8c/JYEGjm9le3B9apimYV X-Received: by 10.236.27.79 with SMTP id d55mr5568379yha.17.1387206236349; Mon, 16 Dec 2013 07:03:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.83.2 with SMTP id m2ls2182414qey.37.gmail; Mon, 16 Dec 2013 07:03:56 -0800 (PST) X-Received: by 10.52.171.79 with SMTP id as15mr7072032vdc.1.1387206236196; Mon, 16 Dec 2013 07:03:56 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id hs8si4064778veb.22.2013.12.16.07.03.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 07:03:56 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id oz11so3330657veb.7 for ; Mon, 16 Dec 2013 07:03:56 -0800 (PST) X-Received: by 10.220.58.1 with SMTP id e1mr8682335vch.0.1387206236076; Mon, 16 Dec 2013 07:03:56 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp109973vcz; Mon, 16 Dec 2013 07:03:55 -0800 (PST) X-Received: by 10.180.13.74 with SMTP id f10mr14128463wic.34.1387206234988; Mon, 16 Dec 2013 07:03:54 -0800 (PST) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx.google.com with ESMTPS id om7si5187036wjc.42.2013.12.16.07.03.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 07:03:54 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.47 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=74.125.82.47; Received: by mail-wg0-f47.google.com with SMTP id n12so4613840wgh.2 for ; Mon, 16 Dec 2013 07:03:54 -0800 (PST) X-Received: by 10.194.173.163 with SMTP id bl3mr14345329wjc.10.1387206234277; Mon, 16 Dec 2013 07:03:54 -0800 (PST) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id hb7sm26581220wib.6.2013.12.16.07.03.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Dec 2013 07:03:53 -0800 (PST) From: Steve Capper To: linux-arm-kernel@lists.infradead.org Cc: linux@arm.linux.org.uk, will.deacon@arm.com, catalin.marinas@arm.com, patches@linaro.org, Steve Capper Subject: [PATCH V2] arm: mm: fix dcache flush logic for compound high pages Date: Mon, 16 Dec 2013 15:03:43 +0000 Message-Id: <1387206223-1670-1-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: steve.capper@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When given a compound high page, __flush_dcache_page will only flush the first page of the compound page repeatedly rather than the entire set of constituent pages. This patch corrects the logic such that all constituent pages are now flushed. Signed-off-by: Steve Capper --- V2: style change use page + i rather than separate struct *cpage --- arch/arm/mm/flush.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 6d5ba9a..3387e60 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -175,16 +175,16 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page) unsigned long i; if (cache_is_vipt_nonaliasing()) { for (i = 0; i < (1 << compound_order(page)); i++) { - void *addr = kmap_atomic(page); + void *addr = kmap_atomic(page + i); __cpuc_flush_dcache_area(addr, PAGE_SIZE); kunmap_atomic(addr); } } else { for (i = 0; i < (1 << compound_order(page)); i++) { - void *addr = kmap_high_get(page); + void *addr = kmap_high_get(page + i); if (addr) { __cpuc_flush_dcache_area(addr, PAGE_SIZE); - kunmap_high(page); + kunmap_high(page + i); } } }