Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1094249rwe; Sat, 27 Aug 2022 00:03:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5fpX2csgaRQV1t9ARhqdOTzzLv4AOfpW1CcscUd1UDJQTN+XxZv941Cb3GYcQk5475/52j X-Received: by 2002:a05:6402:1f01:b0:445:fbe8:4b2e with SMTP id b1-20020a0564021f0100b00445fbe84b2emr9226183edb.192.1661583786740; Sat, 27 Aug 2022 00:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661583786; cv=none; d=google.com; s=arc-20160816; b=qnEgw51pG/mo6Fbb7B4mIlhuYslRlbKvi+JTng8tzJI1yWRpBT54GVsRm4fCUcjEAX 0VViFFYCfqJTNtLsG50r8QCOAZtDoLm+4dWOrXsvtjcwoK4oytLY0suLRgFk1JWa48kL UD0xqOQTT07+tuo4SiHkW9GC2WlpMj2ixiLELW9k2Yj5I/gl9V2WwCK8hxsLr7GlaRnt xXCboSBWmRzUd+ArZ6LglaVX+LYun+cAqLXqymICpungqyoqbvlxy55HjEjyFdR7+y6q GcHgtohlCSukIdNYyLk/l2doCGJ8h5XwVOHLwwPZQoI6TuePrvrcgpI7aVeJhnSATeNE 8fMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mhTXRqS1pwaF0wVHy/WzVg7lEfrR88AA3PLa3O4FV2I=; b=wkA1DmTmkohk48WoOiE/RSd+1dmpLkSJVVbsvJZYFshTC0bpk/UN5MTj5J5Gzk1saY peZzR1WPNdxrZDK+F7cg+yl2RIr5cky0etzhJGHXbJDYc7MLojlOIz14hjVHlmsIi+H1 fe+0DYWVbM2ZvHB4bjBgIepxiyOiAHgT1F8dUSIJzxJmf/AkghiqvDOFFdbQRrd08GGY nGMx2ZSHa0zCJtjFoEqQK4fy3Xh3ktMRp9DL3VaRjATACsgcyvxETvUtEuT9YU5JldCt KjV7bp+q5ENzSeFfziktWr+docJTO35hk+vH7IfR2YL51sUWhO3RGjihDoGD66ETmqdM lAkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JyVB21xM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id zb11-20020a17090687cb00b0073d71b20f36si2201794ejb.428.2022.08.27.00.02.37; Sat, 27 Aug 2022 00:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JyVB21xM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232812AbiH0G40 (ORCPT + 99 others); Sat, 27 Aug 2022 02:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232279AbiH0G4X (ORCPT ); Sat, 27 Aug 2022 02:56:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A43E6B74; Fri, 26 Aug 2022 23:56:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 55621B82781; Sat, 27 Aug 2022 06:56:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB726C433C1; Sat, 27 Aug 2022 06:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661583380; bh=0kJQFVfn/QK44onnEgjV2YxnAzpO9Y03TjV6Q9pAdVQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JyVB21xMPobk31I3vwIMmNqvTn1gtBl+1l9Ng2yP4KaDAohwT8Z/I5u4BK1EcF8HN /qo5zEDobfhsTskKLMfwfS2mrY7eD3ou6PNK1k3xtczUVgjZc3j9LVxhvbl00WHmC8 mIiQv0BzZlEXZ3ImSJB0HShrgT1rNRvAX8kTVA4tLlNqJv6Lyq2j6OyqXQRdovX4pV ILMqC11nGPPpLLQCeZG6VviLjOR6U+Bmgx3rd4TsunE7IivBckD8UL8LuMIsolxUqx PVbzLWT09xq+ttb4IpfwgNPgZa24F+qwg2lnN2YB2DajU0SxN5MqXz4e6Nnp5//kpj zIxT9vBe7bE0w== Received: by mail-wm1-f53.google.com with SMTP id c187-20020a1c35c4000000b003a30d88fe8eso5439836wma.2; Fri, 26 Aug 2022 23:56:19 -0700 (PDT) X-Gm-Message-State: ACgBeo2qCmZKGq/TU3rsMK/Pl1LbWEoHxa3vDzQjeVXa3tO5OxpTOctj Txz7byrQ2pdapr+llEu5Kg7lXzqD3oOdWPxR5ug= X-Received: by 2002:a05:600c:384f:b0:3a6:603c:4338 with SMTP id s15-20020a05600c384f00b003a6603c4338mr1546980wmr.192.1661583378170; Fri, 26 Aug 2022 23:56:18 -0700 (PDT) MIME-Version: 1.0 References: <20220826112327.GA19774@willie-the-truck> <20220826174352.GA20386@willie-the-truck> In-Reply-To: From: Ard Biesheuvel Date: Sat, 27 Aug 2022 08:56:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] wait_on_bit: add an acquire memory barrier To: Mikulas Patocka Cc: Will Deacon , Linus Torvalds , Alan Stern , Andrea Parri , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Aug 2022 at 08:32, Ard Biesheuvel wrote: > > On Fri, 26 Aug 2022 at 21:10, Mikulas Patocka wrote: > > > > > > > > On Fri, 26 Aug 2022, Ard Biesheuvel wrote: > > > > > Could you try booting with earlycon? > > > > > > Just 'earlycon' and if that does not help, > > > > It doesn't help. > > > > > 'earlycon=uart8250,mmio32,' [IIRC, mcbin uses 16550 > > > compatible UARTs, right?] > > > > mcbin is the host system (running a stable kernel fine). The crash happens > > in a virtual machine. The vm uses /dev/ttyAMA0 as a console: > > > > Serial: AMBA PL011 UART driver > > 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 45, base_baud = 0) is a PL011 rev1 > > printk: console [ttyAMA0] enabled > > > > I tried earlycon=pl011,mmio32,0x9000000 - but it doesn't help, it hangs > > without printing anything. > > > > If you are using pl011, you should drop the mmio32 - it only takes a > physical address (and optionally baud rate etc, but QEMU doesn't need > those) Could you try the diff below please? --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -371,7 +371,9 @@ SYM_FUNC_END(create_idmap) SYM_FUNC_START_LOCAL(create_kernel_mapping) adrp x0, init_pg_dir mov_q x5, KIMAGE_VADDR // compile time __va(_text) +#ifdef CONFIG_RELOCATABLE add x5, x5, x23 // add KASLR displacement +#endif adrp x6, _end // runtime __pa(_end) adrp x3, _text // runtime __pa(_text) sub x6, x6, x3 // _end - _text