Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4163333imm; Mon, 30 Jul 2018 09:41:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcoPSNC6SS6f52TAqKDXEo0iUtzNYYouhVzV8LD64BgtzlGWqjWXSv+DeqVnhzg94L6Sqgn X-Received: by 2002:a62:4ece:: with SMTP id c197-v6mr18817135pfb.240.1532968880880; Mon, 30 Jul 2018 09:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532968880; cv=none; d=google.com; s=arc-20160816; b=FCn9J/pud4Dw6q5RE4rP1Wdg+CX0Fl7Lmbk+VsYrXizvs1vR8msvrWxK9ARBk2dbdY p8jfLLVAPdp9VxuqSAwrSH13A+SZVYyb5BgDF6NjrEtJyUKhnkhhN20q41zoH7BnjfI3 elmqdAGuA4O/OXL5fmSbINsphh+uEBUtdMf/lmMNLWeVsaqhwBiSSFmpbYDp2SJQn5sW t1xCQv/4LekFlaDfrGgaCgurqPgpWW10etAcogJbKk6IbBsnEYPtFRaJtKwCp1BuEpS2 Soj0TTVBBaitzT2liKK4Nkd+WiOkkwduRbx4IghuPUQ0gRu148fqxAfhEYbot86oBNHy 5igg== 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=ml1zraQ89i92OnoIQNJk4xaeklyBLwRisFDF3FNVvLc=; b=mwW83idDMoDkiN6NJYfGOPaBx1QP9HRh0XhjjEQDy7fE4PwN2BIYpq3YC2pZP67O3k +PY2h7Z5Lhbb+5xxsO7U08O6L2Hy53iNT7pgqaqAaxcbyFZhV1ZwWyYWg0oTtUUNhGa8 v6HHFK4xmbs59WkiqfnQUbysmInlV9x8uH4zpfYrI6RF0kj/dmze9tqxKPivdXAh7xwK jgLvrZdt8JPzgAv7bzyO80775XG8chg0rdPfNxSrRXzWaGJR9Yg7dzTtgv81ZE865vHh nJ2u0s0UJ6sGwdwNROJ9jb0WDpaNW5njWjB/aRRfYh49NK5hkoo7mOM09kUoU/zYAPTy vNOw== 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 e186-v6si11421822pfc.176.2018.07.30.09.41.05; Mon, 30 Jul 2018 09:41:20 -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 S1731928AbeG3SPb (ORCPT + 99 others); Mon, 30 Jul 2018 14:15:31 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbeG3SPb (ORCPT ); Mon, 30 Jul 2018 14:15:31 -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 5B78580D; Mon, 30 Jul 2018 09:39:43 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.emea.arm.com [10.4.13.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4D2F03F5D0; Mon, 30 Jul 2018 09:39:42 -0700 (PDT) Date: Mon, 30 Jul 2018 17:39:39 +0100 From: Catalin Marinas To: Will Deacon Cc: AKASHI Takahiro , Dave Kleikamp , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range Message-ID: <20180730163938.46zwa7bof7jonako@armageddon.cambridge.arm.com> References: <20180730161641.6zxxy3lxp27tznck@armageddon.cambridge.arm.com> <20180730162235.GC4276@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180730162235.GC4276@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) 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:22:35PM +0100, Will Deacon wrote: > 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? I guess we still need to be able to kexec the crash kernel to get as much information as we can about the failure. -- Catalin