Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4141481imm; Mon, 30 Jul 2018 09:18:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeMD1BzzfQR2hW1G/dHgdKbD8pLbRRDHHNjS/25ejBchBUAiXsTkwMQS3S+PDf/W3Co8xRg X-Received: by 2002:a63:f18:: with SMTP id e24-v6mr17144430pgl.320.1532967533574; Mon, 30 Jul 2018 09:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532967533; cv=none; d=google.com; s=arc-20160816; b=i7wBOcRfbEatzrvhoQa8Unlol8yO64j8vKIPoxeFrxMSDRjDF9ABLzA9W9uJm9rOHT 6xjuTseq14aC3PoVit7UrBuWqqipqp1E4Gd6r+BtgRGfYmONqdM7YQK5YgvswImTCJWu GiieS3GQmr9acPjclSjWtAfyI72P1OTiZAgm1jhePmj5FtgwqEowkjywbT8qC4osAkM5 TBxWSZNEqiqSCout/d9/JdMwLMQPcF7yJ+2pCODAIAuNopiWcdTEaARV/xZTcWxIAzx0 ivpZY6yQ/qZnF8lS6OVI/38iHHfaKBFf0aWpkufeTNQqHCnXiYX6vWVrC0GlJQdPhz3D 2/tw== 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=qWvGE8na365FwprnYXG6qeKqt7ksaGW0crmVWex6KaM=; b=spf/8BIYbLDNzoCKvS3i5cx+y0qA2z9Ds0iSOdrtF1ceuzJmKLTPb01z0gV2dD6mtM 5bh0XX2ccJWuSfXq99mrzo2C8lXd8RVBIi/9zOzaHnAg12/u3yEeisy0jfMeAji6gh7X mcEad0qY0qyy8U9vdR7FDSllNQLNz6Ig3b6MRG2JB78YgjcILJcMOmXlAbGv66AVXh3/ i6DQL9k2l3u1bWrU7R8BFPr0cV+p0yKNfF8gdymzF1/G8T94IgbMCcTX38uSbVrh98Ew KMDeJWELp4an/xaEEYtcCER7lOB8T6RUk9ZQpADl/CsuZ/ad7cQqAWwnUi4wHRMG/Sgu B2Vg== 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 b7-v6si12200109pfj.245.2018.07.30.09.18.39; Mon, 30 Jul 2018 09:18:53 -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 S1731578AbeG3Rw1 (ORCPT + 99 others); Mon, 30 Jul 2018 13:52:27 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41714 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726852AbeG3Rw1 (ORCPT ); Mon, 30 Jul 2018 13:52:27 -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 9CF7880D; Mon, 30 Jul 2018 09:16:45 -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 8EB253F5D0; Mon, 30 Jul 2018 09:16:44 -0700 (PDT) Date: Mon, 30 Jul 2018 17:16:42 +0100 From: Catalin Marinas To: Dave Kleikamp Cc: linux-arm-kernel@lists.infradead.org, AKASHI Takahiro , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range Message-ID: <20180730161641.6zxxy3lxp27tznck@armageddon.cambridge.arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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? > Signed-off-by: Dave Kleikamp > Cc: AKASHI Takahiro > Cc: Catalin Marinas > Cc: Will Deacon > --- > arch/arm64/kernel/machine_kexec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c > index f62effc..e8c0283 100644 > --- a/arch/arm64/kernel/machine_kexec.c > +++ b/arch/arm64/kernel/machine_kexec.c > @@ -184,7 +184,7 @@ void machine_kexec(struct kimage *kimage) > > /* Flush the reboot_code_buffer in preparation for its execution. */ > __flush_dcache_area(reboot_code_buffer, arm64_relocate_new_kernel_size); > - flush_icache_range((uintptr_t)reboot_code_buffer, > + __flush_icache_range((uintptr_t)reboot_code_buffer, > arm64_relocate_new_kernel_size); That's probably needed, at least to avoid a WARN_ON(irqs_disabled()) via smp_call_function_many(). -- Catalin