From patchwork Thu Aug 4 09:15:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 9263193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0FC5B6048B for ; Thu, 4 Aug 2016 09:41:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0065328335 for ; Thu, 4 Aug 2016 09:41:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E935528391; Thu, 4 Aug 2016 09:41:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4AC428335 for ; Thu, 4 Aug 2016 09:41:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVF8z-0000Ux-2l; Thu, 04 Aug 2016 09:40:49 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVF8v-0000UX-1z for linux-arm-kernel@bombadil.infradead.org; Thu, 04 Aug 2016 09:40:45 +0000 Received: from smtp.nue.novell.com ([195.135.221.5]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVElO-0006gr-HG for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2016 09:16:27 +0000 Received: from nwb-ext-pat.microfocus.com ([10.120.13.103]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Thu, 04 Aug 2016 11:16:00 +0200 Received: from linux-gy6r.site (nwb-a10-snat.microfocus.com [10.120.13.201]) by nwb-ext-pat.microfocus.com with ESMTP (TLS encrypted); Thu, 04 Aug 2016 10:15:37 +0100 From: Matthias Brugger To: pbonzini@redhat.com, rkrcmar@redhat.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH 4/4] arm64: hibernate: Check for broadcast TLBI support Date: Thu, 4 Aug 2016 11:15:17 +0200 Message-Id: <1470302117-32296-5-git-send-email-mbrugger@suse.com> X-Mailer: git-send-email 2.6.6 In-Reply-To: <1470302117-32296-1-git-send-email-mbrugger@suse.com> References: <1470302117-32296-1-git-send-email-mbrugger@suse.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160804_051626_783080_7AC4C9FD X-CRM114-Status: UNSURE ( 7.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, mbrugger@suse.com, kvm@vger.kernel.org, david.daney@cavium.com, ard.biesheuvel@linaro.org, zlim.lnx@gmail.com, suzuki.poulose@arm.com, agraf@suse.de, linux-kernel@vger.kernel.org, rrichter@cavium.com, lorenzo.pieralisi@arm.com, james.morse@arm.com, dave.long@linaro.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hibernation makes use of broadcast TLBI. Error out early when this is not supported by the hardware. Signed-off-by: Matthias Brugger --- arch/arm64/kernel/hibernate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c index 21ab5df..7269642 100644 --- a/arch/arm64/kernel/hibernate.c +++ b/arch/arm64/kernel/hibernate.c @@ -481,6 +481,11 @@ static int check_boot_cpu_online_pm_callback(struct notifier_block *nb, static int __init check_boot_cpu_online_init(void) { + if (cpus_have_cap(ARM64_HAS_NO_BCAST_TLBI)) { + pr_err("Can't hibernate: missing broadcast TLBI support.\n"); + return -EINVAL; + } + /* * Set this pm_notifier callback with a lower priority than * cpu_hotplug_pm_callback, so that cpu_hotplug_pm_callback will be