From patchwork Tue Nov 11 06:32:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Schopp X-Patchwork-Id: 40681 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 211F6206A5 for ; Wed, 12 Nov 2014 15:41:06 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf1549849lbj.8 for ; Wed, 12 Nov 2014 07:41:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:subject:from:to:date:message-id :user-agent:mime-version:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=6oxJTLeRiZ1B+vGLmdS1tvOLJskRjXtEAGGF78nzbwg=; b=ZT+1GSWNmDoAgahRZRLPwCVFaH2uuOksr8c13G+GrX78tegTuF8+jhcubC9e/MvpFz rY1HdArXvNr06fbZXTI9Bum49EDpKtv3NrufVfSM3hehRkIsWp90ArWfXdvWmIDkCkEW S+MJgv9JmQn1hfwXJdjB9O2fLE0SIIf0JTrxxF9MXwBktaF3FFOvV+zMAYsP5s9HwVRt Bt+3uzUCtkEUrmBTaSUJPA6WXRY7SopI/JMokgvr4yk3F6THVrqkaczXrjnxfBllFdZY kL9dG9bF77CzC9PiMbEW8sUQIJHygFy1sh4NvILiv6J4H9svzkU6ns37yo/pY2EfV1h7 d2Ag== X-Gm-Message-State: ALoCoQl04PWxYabiKf8NBCvNVUW8CHsmiUSZhqysJqkd+HHmYNJn5eX0V0I9B5Rz5kqTiDUkrvgQ X-Received: by 10.194.91.180 with SMTP id cf20mr3309711wjb.4.1415806865062; Wed, 12 Nov 2014 07:41:05 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.130 with SMTP id d2ls793987laf.32.gmail; Wed, 12 Nov 2014 07:41:04 -0800 (PST) X-Received: by 10.112.173.100 with SMTP id bj4mr3369257lbc.78.1415806864459; Wed, 12 Nov 2014 07:41:04 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id vu8si9875802lbb.84.2014.11.12.07.41.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Nov 2014 07:41:04 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id gd6so11326145lab.6 for ; Wed, 12 Nov 2014 07:41:04 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr42917226laa.71.1415806864337; Wed, 12 Nov 2014 07:41:04 -0800 (PST) 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.112.184.201 with SMTP id ew9csp445048lbc; Wed, 12 Nov 2014 07:41:03 -0800 (PST) X-Received: by 10.66.241.239 with SMTP id wl15mr6271322pac.15.1415806862745; Wed, 12 Nov 2014 07:41:02 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f16si378265pdl.240.2014.11.12.07.41.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Nov 2014 07:41:02 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1Xoa0s-0001la-KA; Wed, 12 Nov 2014 15:39:18 +0000 Received: from mail-by2on0143.outbound.protection.outlook.com ([207.46.100.143] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xoa0q-0001jB-6h for linux-arm-kernel@lists.infradead.org; Wed, 12 Nov 2014 15:39:16 +0000 Received: from BN1PR02CA0026.namprd02.prod.outlook.com (10.141.56.26) by BY2PR02MB201.namprd02.prod.outlook.com (10.242.232.12) with Microsoft SMTP Server (TLS) id 15.1.16.15; Wed, 12 Nov 2014 15:38:53 +0000 Received: from BY2FFO11FD056.protection.gbl (2a01:111:f400:7c0c::101) by BN1PR02CA0026.outlook.office365.com (2a01:111:e400:2a::26) with Microsoft SMTP Server (TLS) id 15.1.16.15 via Frontend Transport; Wed, 12 Nov 2014 15:38:53 +0000 Received: from atltwp02.amd.com (165.204.84.222) by BY2FFO11FD056.mail.protection.outlook.com (10.1.15.193) with Microsoft SMTP Server id 15.1.6.13 via Frontend Transport; Wed, 12 Nov 2014 15:38:52 +0000 X-WSS-ID: 0NEXNGO-08-A3Z-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2753BD16041; Wed, 12 Nov 2014 09:38:47 -0600 (CST) Received: from SATLEXDAG05.amd.com (10.181.40.11) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 12 Nov 2014 09:39:02 -0600 Received: from joelaarch64.amd.com (10.180.168.240) by satlexdag05.amd.com (10.181.40.11) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 12 Nov 2014 10:38:50 -0500 Subject: [PATCH] efi-entry.S: add dsb and isb From: Joel Schopp To: Catalin Marinas Date: Tue, 11 Nov 2014 01:32:04 -0500 Message-ID: <20141111063204.1506.57655.stgit@joelaarch64.amd.com> User-Agent: StGit/0.17.1-4-g4a0c1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(199003)(189002)(19580395003)(105586002)(83506001)(44976005)(19580405001)(20776003)(47776003)(68736004)(95666004)(31966008)(50466002)(99396003)(64706001)(53416004)(46102003)(106466001)(120916001)(33646002)(97736003)(50986999)(54356999)(102836001)(103116003)(107046002)(77096003)(77156002)(62966003)(101416001)(23676002)(92566001)(87936001)(86362001)(92726001)(97746001)(4396001)(229853001)(21056001)(110136001)(84676001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR02MB201; H:atltwp02.amd.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB201; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB201; X-Forefront-PRVS: 03932714EB Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB201; X-OriginatorOrg: amd4.onmicrosoft.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141112_073916_343854_F5AA5272 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [207.46.100.143 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [207.46.100.143 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.5 DATE_IN_PAST_24_48 Date: is 24 to 48 hours before Received: date Cc: Marc Zyngier , Tom Lendacky , Will Deacon , linux-arm-kernel@lists.infradead.org, Joel Schopp 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: joel.schopp@amd.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 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 Add a dsb and isb after the instruction flush before the data cache and mm offing. Without this patch I am seeing synchronous exceptions occur every few boots. Signed-off-by: Joel Schopp Tested-by: Tom Lendacky Tested-by: Tom Lendacky --- arch/arm64/kernel/efi-entry.S | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S index 619b1dd..7d95eda 100644 --- a/arch/arm64/kernel/efi-entry.S +++ b/arch/arm64/kernel/efi-entry.S @@ -76,6 +76,12 @@ ENTRY(efi_stub_entry) bl __flush_dcache_area ic ialluis + /* We need to sync again after the instruction cache sync + * and before turning off the dcache and mmu + */ + dsb sy + isb + /* Turn off Dcache and MMU */ mrs x0, CurrentEL cmp x0, #CurrentEL_EL2