Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2561577imm; Thu, 16 Aug 2018 11:30:40 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzn6v/1NNgvTUlTeu/jp4B5XZUUIqH/sW6kPpVFJXmWyCXsVisjcEcKcN7GxODEA2DGKu1z X-Received: by 2002:a62:6746:: with SMTP id b67-v6mr33349548pfc.243.1534444240702; Thu, 16 Aug 2018 11:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534444240; cv=none; d=google.com; s=arc-20160816; b=ZLn+TiH6e7UWIB5DPyQ3TCN7dLb645vqYu3jdP/i9tgFOOhUP/fp+62wMka2r2fCDb fkZyU7lMj+C42Q7g/SqCNn20NtfquUqm3pSJ3e2uSEK6QfhBTouPb9WbbTUeA3DcWtT0 CsYCD5ZN8y1uA7e1CChbFM0whQFGjX6zrKlLVyuagmz7u5yktVkiVFMgEZ6hc0XblirD qQpGBqmanByrhw6emyh6EurjPcpf3g129RjozKNChMEAEhxOjVOQUXu+2wwKI3yCe/lS JNBwY8x0cDH7JRp/htcZ7RHxDdZ9hzjYjNqGVH6eXzCBTjvJofus+BEjvW2zmVBH44SI yogA== 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:from:references:cc:to:subject:arc-authentication-results; bh=VpwU/sH/OWl0cuocXwj5aCsTBiObFXUFqLJDy6Z6TA8=; b=MAn6LBks8w4Ou/lmWGvsNbbWu3HXXvK6+tbY84ga7ExIqN1kyj1WB3yMLilwaYUY7g 0VcBTLJK27bClVAwzqq0GUF9I8J0/owx3MiYQtYSWMHeOG3f1ngQzUIrw81sWIL0s74P EP6L81oyzQ3zeJzYsotDhMEJzuvpb7U55jWlyBgrWuqgrUsa3TmpxKS1clGYfrHu6RNh F+1UlQt0FslaXr2CHqwNKto/YHl1t9hX8fw7eQtJu44+UkP72Ub8ZwtLZZPwo8oH3sE+ BtZ80KZZ9b9KTCRGpB0XhSa23XrFKaFRKFxid8Mnzff4JDQNsKR26LKlpfv+RKnc96Me ON6A== 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 32-v6si25622473pgy.672.2018.08.16.11.30.25; Thu, 16 Aug 2018 11:30:40 -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 S2389822AbeHPQ5u (ORCPT + 99 others); Thu, 16 Aug 2018 12:57:50 -0400 Received: from foss.arm.com ([217.140.101.70]:37064 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727732AbeHPQ5t (ORCPT ); Thu, 16 Aug 2018 12:57:49 -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 915BF80D; Thu, 16 Aug 2018 06:59:02 -0700 (PDT) Received: from [10.4.12.39] (e113632-lin.emea.arm.com [10.4.12.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E2673F5D0; Thu, 16 Aug 2018 06:59:01 -0700 (PDT) Subject: Re: AArch64 boot failure on Hikey960 on latest master after "arm64: insn: Don't fallback on nosync path for general insn patching" To: Will Deacon , Tuomas Tynkkynen Cc: Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org References: <462f8ae6-9948-a8e5-7504-623d40344336@iki.fi> <20180816102219.GF31093@arm.com> From: Valentin Schneider Message-ID: <6490931d-65b6-e524-f2d0-65cbac0a263b@arm.com> Date: Thu, 16 Aug 2018 14:58:59 +0100 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: <20180816102219.GF31093@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 16/08/18 11:22, Will Deacon wrote: > Hi Tuomas, [+John] > > On Thu, Aug 16, 2018 at 02:38:51AM +0300, Tuomas Tynkkynen wrote: >> Booting Linus's master of today with the usual arm64 defconfig fails for >> me on the Hikey960 board. I've bisected it down to: >> >> commit 693350a7998018391852c48f68956cf0f855b2b9 (HEAD, refs/bisect/bad) >> Author: Will Deacon >> Date: Tue Jun 19 17:55:28 2018 +0100 >> >> arm64: insn: Don't fallback on nosync path for general insn patching >> >> Here's the boot log with earlycon enabled after which the boot hangs: > > Thanks for the boot log, that's really helpful. Please can you try the diff > below? > I get the same "BUG: scheduling while atomic" when running the current master (f91e654474d413201ae578820fb63f8a811f6c4e), and confirmed that I don't get it on my setup when checking out the direct parent of 693350a7998018391852c48f68956cf0f855b2b9. Tried out the diff and the board doesn't seem to die anymore, so FWIW: Tested-by: Valentin Schneider > Out of interest -- do you know if Hikey960 is used by any boot-testing > farms? The patch above has been in linux-next for ages, but we didn't see > any complaints until it hit mainline :( > > Cheers, > > Will > > --->8 > > diff --git a/arch/arm64/kernel/jump_label.c b/arch/arm64/kernel/jump_label.c > index c2dd1ad3e648..e0756416e567 100644 > --- a/arch/arm64/kernel/jump_label.c > +++ b/arch/arm64/kernel/jump_label.c > @@ -36,7 +36,7 @@ void arch_jump_label_transform(struct jump_entry *entry, > insn = aarch64_insn_gen_nop(); > } > > - aarch64_insn_patch_text(&addr, &insn, 1); > + aarch64_insn_patch_text_nosync(addr, insn); > } > > void arch_jump_label_transform_static(struct jump_entry *entry, >