Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4169315imm; Mon, 30 Jul 2018 09:47:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfaZboQhZWppZ+uWmoR9WvfjZi9I6kTgcxFSpTBVBrLC7fMB6rN2vtFNLAz5zF1q7F85wzC X-Received: by 2002:a63:3c4a:: with SMTP id i10-v6mr17056134pgn.415.1532969264793; Mon, 30 Jul 2018 09:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532969264; cv=none; d=google.com; s=arc-20160816; b=ZYIPWwODetK5Nf7o3KKP08TOC/Dt7rULtoukj6Z+AT64p3LvHbbPGOLBU+zuh+bBqm gJl+a800ewi+4y63Ky+gNY0DvT2tP+rRQy8JzTKDDGzNgGpOxOlS2QnJ6zOpYjFjO9AG 9TkIjN3LcTklr/57ZI0RGsFtV8aFk0W4jX0noZNwhN0AW6v0697/L1uugNVm25pv2hI7 XIGCgbTPso2+Majq7CQDe+B+NdjyqWLjcUX9z9Ew4FLpBqUC5onmKPFM/dyLrV2izX0+ CH/cQj8J0givAtIXDXaYodEUxef19zDo/6ftLdTT2lwWQNWfjvwoU23gOAC5hDoBSuaW vgRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=OkrCXnbpaIi1rKJZdguUUEr3hhXSXL5RC8bIN8rVK/8=; b=hHX162/X83jzxofg/PYXypsOBe+GZ9S3MFq61xskwYXNxXORGHMifAE3KHQjrRUi+p yVKvS1hQ/vELxiRdoTG7ZGcVfZmxGEpi1fjV3c7iEjvUYV0HPBOJ3EV3Qkxgn3SaBCIY fvo2/3VgUkLWV9IV3hYTK5g7JmtLMeyfKd7pHtkmqxNYKH5c+b3xl3lYLSaVd+jM74MH QGxQICqwdC/sMdiVEt0gJEnHRw2fV7n2Edz1N3YoJ4B/APr9/pg+33nPc+SggSCu/NpU vZUoGc2bmEgrV/PYZbB0FjgfF/Bk9qVyhDGJuQClrJNmH8q0zbVn67AgbzQLWhR2+1CK etRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=itOJqoaK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9-v6si10904713pgf.380.2018.07.30.09.47.30; Mon, 30 Jul 2018 09:47:44 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=itOJqoaK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731906AbeG3SWf (ORCPT + 99 others); Mon, 30 Jul 2018 14:22:35 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:39312 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728963AbeG3SWf (ORCPT ); Mon, 30 Jul 2018 14:22:35 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6UGdF7g145792; Mon, 30 Jul 2018 16:46:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=OkrCXnbpaIi1rKJZdguUUEr3hhXSXL5RC8bIN8rVK/8=; b=itOJqoaKp7fgMWtiCqzwmWi2npCo9DBV9IvsBbFSlZV3E2Gh8ETP+aCsIitPQz+vxrMm 95BYBbdOwZ5TBwzuXe+mE2kPfJHn/65YiZ46Qe++2YoyBdWE6WA6jc2vulpql2k1x2EY cc8Ktjy4mYjCfRGsiniLiOUFRyqbFe9iKHZK+NfegqtOw4bGf6SJDv44jK03zG6LBm4Q EwplIMZnTlHDWuBBk9v94FQ1kz8G2Ah+jIaN4xl9NquAWTl4tZ5ZU9TtkJU53pS7urPD l/t6NfXaB0clYj6kZy7X2VIQ7NKXSuyBBAqrZVgns1Thc7/yWUohzvSBnuTXRDw5uZt8 AA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2kggenwcrp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jul 2018 16:46:27 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w6UGkQMw027058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jul 2018 16:46:26 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w6UGkQtj018363; Mon, 30 Jul 2018 16:46:26 GMT Received: from [192.168.1.93] (/99.156.91.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Jul 2018 09:46:25 -0700 Subject: Re: [PATCH 1/1] arm64: kexec: machine_kexec should call __flush_icache_range To: Will Deacon , Catalin Marinas Cc: AKASHI Takahiro , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180730161641.6zxxy3lxp27tznck@armageddon.cambridge.arm.com> <20180730162235.GC4276@arm.com> From: Dave Kleikamp Openpgp: preference=signencrypt Message-ID: <2651847f-79ea-fe2a-c1d7-efe4d11702b4@oracle.com> Date: Mon, 30 Jul 2018 11:46:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180730162235.GC4276@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8970 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807300181 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/30/2018 11:22 AM, 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 observed the hang trying to kexec a crash kernel and I did not see the warning that smp_crash_stop_failed(). I'm not exactly sure why flush_icache_range() hung (but it did), but I think that __flush_icache_range() makes more sense here anyway. > > Will > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >