From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBAECC388F7 for ; Wed, 28 Oct 2020 21:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 889712475D for ; Wed, 28 Oct 2020 21:45:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=jms.id.au header.i=@jms.id.au header.b="jm63EXKg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726324AbgJ1Vpt (ORCPT ); Wed, 28 Oct 2020 17:45:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726097AbgJ1Vpt (ORCPT ); Wed, 28 Oct 2020 17:45:49 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC95C0613CF for ; Wed, 28 Oct 2020 14:45:48 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id r9so1082780ioo.7 for ; Wed, 28 Oct 2020 14:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I9SAz1Nr0rbpfdGWAlkoW2b28vlFNuIq9ln5WxnlO4E=; b=jm63EXKgY9yyp1UxuzjBCQD7lC3SlsBlciOvn/TyDTxBtCltv+kSg/7eppr8WRaovK l7iZ03reiAJmpcGehqZlNkYlVfd9wO1TED09s1t7az9Ed7YH1kdYHNCFN4RqGe1IgEBN AEXHW4PeYMNP2qUZ+TRbeOjL37UttB+8fbDgM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I9SAz1Nr0rbpfdGWAlkoW2b28vlFNuIq9ln5WxnlO4E=; b=dDpOAm0t2cmXPzEFXAW3KX4d6avwDC8KG2tcZO1cPrYt02y6guoWdF/Mo6D1w00nZF L86vE2ZMaQLLE6jL+JhpjmxLbBzuULDvK/wX2BvKRL0JRsBhg9LikIAjv/tTJHYKZwop ni7cF/Yuj9CZSgJvJnkJ9+FWssks7mizV7TObEGGnXEn1xhI7iqcknNJTj2D+nkdRR5G 72965gK70bWjzOnjFAODzZVZGqSNMCDjNcPduXgTBIpXplqBD2pA1tzVCIVBF2ddfkBn AffDInBPO85beZD4Bqv86ffnanl7F+qwzIGY75RwaSLZ/KGk8cubtPRGRRhJC0RRVUxj 79hw== X-Gm-Message-State: AOAM533x/WSYBfoXudq9rnhDb4CCeqQnKJ37Ya0+3JZBhujGPnZwOf+a Bawa6VdzthbzapLO2IFxCYK40tkqYwLKQ7AmQPLPkGD+Oscybw== X-Google-Smtp-Source: ABdhPJwAj/+NNjUkoBXwXq5DIu0VTgWJza/6mTiWtlwuzf8bHOQ4vuDIb6imlwzIdmboQTzZiA7uP7/f3oC4UgxCMI4= X-Received: by 2002:a37:a81:: with SMTP id 123mr6993857qkk.487.1603890401898; Wed, 28 Oct 2020 06:06:41 -0700 (PDT) MIME-Version: 1.0 References: <20201007083944.27910-1-ardb@kernel.org> <20201007083944.27910-3-ardb@kernel.org> <920965b8-6f87-3f82-9fce-d3051fc543ca@samsung.com> In-Reply-To: From: Joel Stanley Date: Wed, 28 Oct 2020 13:06:29 +0000 Message-ID: Subject: Re: [PATCH v2 2/2] ARM: move device tree mapping out of linear region To: Ard Biesheuvel Cc: Marek Szyprowski , Linux ARM , Linux Samsung SOC , Krzysztof Kozlowski , Linus Walleij , Florian Fainelli , Russell King , Rob Herring , Nicolas Pitre , =?UTF-8?Q?C=C3=A9dric_Le_Goater?= Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org On Wed, 28 Oct 2020 at 13:00, Ard Biesheuvel wrote: > > On Wed, 28 Oct 2020 at 13:59, Joel Stanley wrote: > > > > On Wed, 28 Oct 2020 at 12:53, Ard Biesheuvel wrote: > > > > > > On Wed, 28 Oct 2020 at 13:05, Joel Stanley wrote: > > > > > > > > On Wed, 28 Oct 2020 at 09:19, Marek Szyprowski wrote: > > > > > This patch landed in linux-next 20201028 as commit 7a1be318f579 ("ARM: > > > > > 9012/1: move device tree mapping out of linear region"). Sadly it broke > > > > > booting almost all Samsung Exynos-based boards. The only one which > > > > > booted, used an appended device tree. I can provide more information if > > > > > needed, just let me know what to check. "Starting kernel ..." is the > > > > > last message I see here. No output from earlycon. > > > > > > > > A bisection lead me to this patch after the next-20201028 failed to > > > > boot on the aspeed systems in testing (aspeed_g5_defconfig). > > > > > > > > You can reproduce this with today's next and qemu 5.1: > > > > > > > > qemu-system-arm -M romulus-bmc -nographic \ > > > > -kernel arch/arm/boot/zImage \ > > > > -dtb arch/arm/boot/dts/aspeed-bmc-opp-romulus.dtb \ > > > > -initrd any-old-file > > > > > > > > It requires the initrd option to reproduce, but the initrd doesn't > > > > need to be valid as we don't make it that far. > > > > > > > > There is no output but attaching gdb shows the kernel is stuck in > > > > setup_machine_tags. (If we enable CONFIG_ATAGS it is instead stuck in > > > > calibrate_delay). > > > > > > > > (gdb) bt > > > > #0 setup_machine_tags (machine_nr=, > > > > __atags_vaddr=) at ../arch/arm/kernel/atags.h:12 > > > > #1 setup_arch (cmdline_p=0x80c01fc4) at ../arch/arm/kernel/setup.c:1100 > > > > #2 0x80b00d2c in start_kernel () at ../init/main.c:862 > > > > #3 0x00000000 in ?? () > > > > > > > > Reverting 7a1be318f579 on top of next allowed the system to boot again. > > > > > > > > > > Does this help? > > > > Yes, that boots to userspace. > > > > Thanks. I'll take that as a tested-by Please do. Thanks for the quick fix. Cheers, Joel > > > > > > > > diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h > > > index bb79e52aeb90..4f355bda872a 100644 > > > --- a/arch/arm/include/asm/memory.h > > > +++ b/arch/arm/include/asm/memory.h > > > @@ -68,8 +68,8 @@ > > > #define XIP_VIRT_ADDR(physaddr) (MODULES_VADDR + ((physaddr) & 0x000fffff)) > > > > > > #define FDT_FIXED_BASE UL(0xff800000) > > > -#define FDT_FIXED_SIZE (2 * PMD_SIZE) > > > -#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | > > > (physaddr) % PMD_SIZE)) > > > +#define FDT_FIXED_SIZE (2 * SECTION_SIZE) > > > +#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | > > > (physaddr) % SECTION_SIZE)) > > > > > > #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) > > > /* From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E9EFC388F7 for ; Wed, 28 Oct 2020 13:07:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EEA062473E for ; Wed, 28 Oct 2020 13:07:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j0GQOj5u"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=jms.id.au header.i=@jms.id.au header.b="jm63EXKg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEA062473E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fd4gRCggcSKGPShKnH9MG25FOmBXeWOXAWCP57yKArc=; b=j0GQOj5udFZfz16pwIzm7LwPB +ouALbzrsEMs9IM7urJ0houzPcNFITzjSUMiJBFuV1CrShpIV1fn6DWlwSYkz8ff/2KNrPHTX81Pc s+fLzkJxpXMGJWaSwDcviKIJKylxdb+QE9f9upmbRuBP+B+rFA9mYPTX3mA2D+CfPtiIxfxs6/vpn wosaUVSmZaY0DahGL4pTgOJv1P7gmCVcgLWxhJf2U/cbaSnA+Z8LQ1rLtLJuANYzzPgKaHI9Xp1Y8 hXHhy7MW8m99YSM5Cls/QL2U6mbs/sa3xOxGvvv+bjJvf6Zq4ts6+CJtR4QRNfrTOJQ7UDNep4pep G59/kunQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXlA6-0007za-Nt; Wed, 28 Oct 2020 13:06:46 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXlA3-0007yT-PD for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 13:06:44 +0000 Received: by mail-qk1-x741.google.com with SMTP id k9so4375981qki.6 for ; Wed, 28 Oct 2020 06:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I9SAz1Nr0rbpfdGWAlkoW2b28vlFNuIq9ln5WxnlO4E=; b=jm63EXKgY9yyp1UxuzjBCQD7lC3SlsBlciOvn/TyDTxBtCltv+kSg/7eppr8WRaovK l7iZ03reiAJmpcGehqZlNkYlVfd9wO1TED09s1t7az9Ed7YH1kdYHNCFN4RqGe1IgEBN AEXHW4PeYMNP2qUZ+TRbeOjL37UttB+8fbDgM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I9SAz1Nr0rbpfdGWAlkoW2b28vlFNuIq9ln5WxnlO4E=; b=XlLRmi0RYdi0In6R+kAYeFTyZrACo/lsdeFOU/l8jazsfmWbmdXGgOq2cuz2GzjYHa LJIl4fM/IpzRcuBv0CpRI9+Ma5StudXnZ1PZA0Ttu1ztq4GnZzt8lwurTcGxWQwk3/sW DDZ0vYKNjA2OMxICqjZimNiZcI4fOkuWxq6G/NM+Q2hioCKwOMODBK/GATmGrM+JdD75 TG5YbRZoEgWi7XIhx3RHs6rb76bcBzQ9NFahT/kT34G4GalaKlNkWKSXXArbIvr7hf22 sTC4bNVxFiGhHTr58sr9psMncVjW+vA39r4YiT3XJqOaxFHBawxGc6cFL0y+arqswFYU mDVg== X-Gm-Message-State: AOAM533ACXFDvfsekExyZcN+Qyt1FKOZ8AgwZP8/bbMyXhFqQv939sf7 d00kf3NQMt/EJ4DBEx6ZdNkdw+J/eTsVhlBLTDc= X-Google-Smtp-Source: ABdhPJwAj/+NNjUkoBXwXq5DIu0VTgWJza/6mTiWtlwuzf8bHOQ4vuDIb6imlwzIdmboQTzZiA7uP7/f3oC4UgxCMI4= X-Received: by 2002:a37:a81:: with SMTP id 123mr6993857qkk.487.1603890401898; Wed, 28 Oct 2020 06:06:41 -0700 (PDT) MIME-Version: 1.0 References: <20201007083944.27910-1-ardb@kernel.org> <20201007083944.27910-3-ardb@kernel.org> <920965b8-6f87-3f82-9fce-d3051fc543ca@samsung.com> In-Reply-To: From: Joel Stanley Date: Wed, 28 Oct 2020 13:06:29 +0000 Message-ID: Subject: Re: [PATCH v2 2/2] ARM: move device tree mapping out of linear region To: Ard Biesheuvel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201028_090644_261973_91C3CD31 X-CRM114-Status: GOOD ( 29.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , Nicolas Pitre , Linus Walleij , Russell King , Krzysztof Kozlowski , Rob Herring , Linux Samsung SOC , =?UTF-8?Q?C=C3=A9dric_Le_Goater?= , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 28 Oct 2020 at 13:00, Ard Biesheuvel wrote: > > On Wed, 28 Oct 2020 at 13:59, Joel Stanley wrote: > > > > On Wed, 28 Oct 2020 at 12:53, Ard Biesheuvel wrote: > > > > > > On Wed, 28 Oct 2020 at 13:05, Joel Stanley wrote: > > > > > > > > On Wed, 28 Oct 2020 at 09:19, Marek Szyprowski wrote: > > > > > This patch landed in linux-next 20201028 as commit 7a1be318f579 ("ARM: > > > > > 9012/1: move device tree mapping out of linear region"). Sadly it broke > > > > > booting almost all Samsung Exynos-based boards. The only one which > > > > > booted, used an appended device tree. I can provide more information if > > > > > needed, just let me know what to check. "Starting kernel ..." is the > > > > > last message I see here. No output from earlycon. > > > > > > > > A bisection lead me to this patch after the next-20201028 failed to > > > > boot on the aspeed systems in testing (aspeed_g5_defconfig). > > > > > > > > You can reproduce this with today's next and qemu 5.1: > > > > > > > > qemu-system-arm -M romulus-bmc -nographic \ > > > > -kernel arch/arm/boot/zImage \ > > > > -dtb arch/arm/boot/dts/aspeed-bmc-opp-romulus.dtb \ > > > > -initrd any-old-file > > > > > > > > It requires the initrd option to reproduce, but the initrd doesn't > > > > need to be valid as we don't make it that far. > > > > > > > > There is no output but attaching gdb shows the kernel is stuck in > > > > setup_machine_tags. (If we enable CONFIG_ATAGS it is instead stuck in > > > > calibrate_delay). > > > > > > > > (gdb) bt > > > > #0 setup_machine_tags (machine_nr=, > > > > __atags_vaddr=) at ../arch/arm/kernel/atags.h:12 > > > > #1 setup_arch (cmdline_p=0x80c01fc4) at ../arch/arm/kernel/setup.c:1100 > > > > #2 0x80b00d2c in start_kernel () at ../init/main.c:862 > > > > #3 0x00000000 in ?? () > > > > > > > > Reverting 7a1be318f579 on top of next allowed the system to boot again. > > > > > > > > > > Does this help? > > > > Yes, that boots to userspace. > > > > Thanks. I'll take that as a tested-by Please do. Thanks for the quick fix. Cheers, Joel > > > > > > > > diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h > > > index bb79e52aeb90..4f355bda872a 100644 > > > --- a/arch/arm/include/asm/memory.h > > > +++ b/arch/arm/include/asm/memory.h > > > @@ -68,8 +68,8 @@ > > > #define XIP_VIRT_ADDR(physaddr) (MODULES_VADDR + ((physaddr) & 0x000fffff)) > > > > > > #define FDT_FIXED_BASE UL(0xff800000) > > > -#define FDT_FIXED_SIZE (2 * PMD_SIZE) > > > -#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | > > > (physaddr) % PMD_SIZE)) > > > +#define FDT_FIXED_SIZE (2 * SECTION_SIZE) > > > +#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | > > > (physaddr) % SECTION_SIZE)) > > > > > > #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) > > > /* _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel