Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4147192imm; Mon, 30 Jul 2018 09:24:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfG3O06ZfndYycOQeGHn6S+9NnLGU5lfkIbfn0tCv49mLCb1BHQzqOuKeecFIf8mVXjHsQ4 X-Received: by 2002:a63:5350:: with SMTP id t16-v6mr16828776pgl.196.1532967852571; Mon, 30 Jul 2018 09:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532967852; cv=none; d=google.com; s=arc-20160816; b=Y1TYCY3kVxBOYdP6J9UB5a8JdVHYZDnoNad06aRlh1rYiXXYHkbyBjDRWL9e1C2hzR v7NM+czc6hLRdQD0664glJIV+9eLJwDBBSJNYamXLSJ0xY49JsT/8w0rMihb8JQ+A8O+ XyQn1/SwJ8PZGgXXKsSDtMq+oTWMr6CebNiT29YhcngYOLCciXDC9+yMPyqLPkmcp9kf XnG5bn+9PYKgLn1UubkNroZlMrWQt92bFLnWNRyLYhQy/WySy1VSKtUh/PAN6/AcmO76 b7hUXoAKsnbOznRCTpfU41NLATtwrGJc71ijKgn6G4CSS/tu148WV+z73T0AQ1RB+/Ez WpHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YWaz2sX44l4UOz+yWIK49W2y34MUOq8qPHUTsiult2E=; b=bGgczoltjqjkIw4IR7kLbl3joxh2CIDFRW56pN9PN/qJWdYmfHZsq9tdN+IvlkYDfK jSbK7xHv/2ZpIWvjoYbFAynaB1Qg1tBvOPxrn1xDpOs2LAD9P34k/aypYMon67tpw55S J+Bg2Iws8sPhQzc1GakAZSGsRSWJBoZwjNTLbgGyh+bFGuWK0EPAui9rIFh+PoHXrzlW dMskwPOL7UNp4uhrFe/0hYck03tuWxhjy2j09Yu3Ad9Wh+FjmPSwwRF5v2OMDuryCmGu UTL0ofcrCZ1m++OKZjWUN+7GjOSmSJpLnPHzMjIByYs8eiJMvkxhx7ze0XtG0AT6uxha uXkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si1497020plz.351.2018.07.30.09.23.58; Mon, 30 Jul 2018 09:24:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728777AbeG3R6R (ORCPT + 99 others); Mon, 30 Jul 2018 13:58:17 -0400 Received: from foss.arm.com ([217.140.101.70]:41856 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeG3R6R (ORCPT ); Mon, 30 Jul 2018 13:58:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 457FD80D; Mon, 30 Jul 2018 09:22:34 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0C9793F5D0; Mon, 30 Jul 2018 09:22:34 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id A63B51AE3096; Mon, 30 Jul 2018 17:22:35 +0100 (BST) Date: Mon, 30 Jul 2018 17:22:35 +0100 From: Will Deacon To: Catalin Marinas Cc: Dave Kleikamp , linux-arm-kernel@lists.infradead.org, AKASHI Takahiro , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range Message-ID: <20180730162235.GC4276@arm.com> References: <20180730161641.6zxxy3lxp27tznck@armageddon.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730161641.6zxxy3lxp27tznck@armageddon.cambridge.arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 30, 2018 at 05:16:42PM +0100, Catalin Marinas wrote: > On Mon, Jul 30, 2018 at 10:29:21AM -0500, Dave Kleikamp wrote: > > machine_kexec flushes the reboot_code_buffer from the icache > > after stopping the other cpus. > > > > Commit 3b8c9f1cdfc5 ("arm64: IPI each CPU after invalidating the I-cache > > for kernel mappings") added an IPI call to flush_icache_range, which > > causes a hang here, so replace the call with __flush_icache_range > > While machine_kexec() may be called with interrupts disabled (IIUC) and > we shouldn't IPI other CPUs, I don't understand why it hangs here. Are > there any other CPUs online at this point? The BUG_ON and WARN_ON at the start of machine_kexec() suggest to me that this should only happen if we're kexec'ing a crash kernel and smp_crash_stop_failed(). Is that something we need to care about? Will