From patchwork Fri Jun 6 10:29:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 4311011 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 295AEBEEAA for ; Fri, 6 Jun 2014 10:32:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66574201CD for ; Fri, 6 Jun 2014 10:32:54 +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 8CD9D201C8 for ; Fri, 6 Jun 2014 10:32:53 +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 1WsrQ3-0007qQ-OO; Fri, 06 Jun 2014 10:30:43 +0000 Received: from mail-wg0-f41.google.com ([74.125.82.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WsrQ0-0007Pr-Ba for linux-arm-kernel@lists.infradead.org; Fri, 06 Jun 2014 10:30:40 +0000 Received: by mail-wg0-f41.google.com with SMTP id z12so2537322wgg.0 for ; Fri, 06 Jun 2014 03:30:16 -0700 (PDT) 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; bh=x8RfeLyQlmu3EwEXqjbBp2WR6gdp/pdCeJopeAstZMs=; b=fUH2t7xS5jcSZj4xWgfg/vmkyi+pYhkDPiYVjEMvYeTaIGGvYtXvwptQfViz0jwatJ j3WkGikiK9jhXd0cvtwkxxL8fxsncNX6939e4DTepbGvmLsy+8bqb/oHn1dV+kT/T0Dl yj85r1gT6iwQVEVHLEgCh6fcoq5QITacMNMQOZK4JZJAYyb6yDF+uSJYDSXTcVQE7yqr C0fR07cXHqjTeqBLFG2Qb/H7AyFlnLLmIx2FysUqotTDf9HI1dCej36UbHgHWThbgXGT ALrSPEukOjjW/mUaDAX+WkhSDiB2cNhwXgOYqbayGV87TwgN87qqO7yF3FUV077tBRXG x0YQ== X-Gm-Message-State: ALoCoQnfxY/ZsD/KlX2G79oRbnYnXqeOidSYBblVgCBGTV7+jiaVNPbl7EtGCgEvYVKQZy9RXGP1 X-Received: by 10.194.6.2 with SMTP id w2mr5614957wjw.6.1402050615894; Fri, 06 Jun 2014 03:30:15 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginm.net. [86.14.224.72]) by mx.google.com with ESMTPSA id be3sm11783449wjc.5.2014.06.06.03.30.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2014 03:30:15 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap Date: Fri, 6 Jun 2014 11:29:50 +0100 Message-Id: <1402050590-23877-1-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140606_033040_540525_3210DA11 X-CRM114-Status: GOOD ( 11.27 ) X-Spam-Score: -0.7 (/) Cc: catalin.marinas@arm.com, will.deacon@arm.com, steve.capper@linaro.org, msalter@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm Tested-by: Graeme Gregory Cc: Steve Capper --- arch/arm64/mm/ioremap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c index 7ec3283..5b8766c 100644 --- a/arch/arm64/mm/ioremap.c +++ b/arch/arm64/mm/ioremap.c @@ -176,9 +176,10 @@ void __init __early_set_fixmap(enum fixed_addresses idx, pte = early_ioremap_pte(addr); - if (pgprot_val(flags)) + if (pgprot_val(flags)) { set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags)); - else { + flush_cache_vmap(addr, addr + PAGE_SIZE); + } else { pte_clear(&init_mm, addr, pte); flush_tlb_kernel_range(addr, addr+PAGE_SIZE); }