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: 31476 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2FC76203C3 for ; Fri, 6 Jun 2014 10:30:33 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf11572787oag.8 for ; Fri, 06 Jun 2014 03:30:33 -0700 (PDT) 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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=z1tDG65ew7AAw8W+kLXdg4atsUTgSagZuh9nqNrgSHs=; b=hmbwgiltjAi2ZzFx0X9RAW6JbF2WzAuiAczOHq5S6b+573iqZXETlhekmFbHOS+mDE t/OrCY03DV5TxjDM75Vm4KeDeN3B9RTq4aUXWQa6B3VWmokcFd5RcD3q0qzDcJFEdmuJ RoVWhiaCs/syyuc9/mabXsXoJ7/h1YSNfV3Jzief6TFXrc04wJyzi2vsj5sqrgPRQJqd N/avnbMFUWo2uf52hPv/8rdCgm/kSokeQNXsZvS2B3XM1GmUL21EXRPTeyLvkwTuSJJ2 AEAhKKDoZguLY7RM5JkLbstrVDR6fa1T60AuJUn0hYlcS253WmONR658XtGbZfcrvTvT q9gA== X-Gm-Message-State: ALoCoQkTeYoufeXPwUB+Tf3uHlou8HUAJOf8yERBdrYb7O4kkC70j3VEUdRg+SYsO86Y7z8c1DzW X-Received: by 10.42.247.8 with SMTP id ma8mr2510910icb.30.1402050633490; Fri, 06 Jun 2014 03:30:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.40 with SMTP id m37ls665579qgd.18.gmail; Fri, 06 Jun 2014 03:30:33 -0700 (PDT) X-Received: by 10.58.248.2 with SMTP id yi2mr1861122vec.48.1402050633363; Fri, 06 Jun 2014 03:30:33 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id rn6si4561896vcb.80.2014.06.06.03.30.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Jun 2014 03:30:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id sa20so2871690veb.9 for ; Fri, 06 Jun 2014 03:30:33 -0700 (PDT) X-Received: by 10.221.7.71 with SMTP id on7mr3840672vcb.18.1402050633274; Fri, 06 Jun 2014 03:30:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp86726vcb; Fri, 6 Jun 2014 03:30:32 -0700 (PDT) X-Received: by 10.60.131.210 with SMTP id oo18mr5321556oeb.70.1402050632769; Fri, 06 Jun 2014 03:30:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tq1si18654518pbc.162.2014.06.06.03.30.31; Fri, 06 Jun 2014 03:30:31 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752218AbaFFKaV (ORCPT + 27 others); Fri, 6 Jun 2014 06:30:21 -0400 Received: from mail-we0-f177.google.com ([74.125.82.177]:59971 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbaFFKaR (ORCPT ); Fri, 6 Jun 2014 06:30:17 -0400 Received: by mail-we0-f177.google.com with SMTP id u56so550905wes.36 for ; Fri, 06 Jun 2014 03:30:16 -0700 (PDT) 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 Cc: msalter@redhat.com, catalin.marinas@arm.com, will.deacon@arm.com, steve.capper@linaro.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , __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); }