Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2642126pxb; Mon, 18 Apr 2022 05:24:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPYcNZLSSUJqd0qiWaukSR6vk+FrZjbvZy/+AJSXh2e5FV3ZRX3nOEfp0FKYpr/Vo+xN2P X-Received: by 2002:a17:902:ce06:b0:156:8118:9e9a with SMTP id k6-20020a170902ce0600b0015681189e9amr10910162plg.169.1650284654125; Mon, 18 Apr 2022 05:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650284654; cv=none; d=google.com; s=arc-20160816; b=LueE+b6Ff9ceGjE5AbItREJggPDwbfXsBTqB+A0QpFUqIhs5XR4IglOwLDOKzirUnH Y/caG/rEJpUIofSG8csdKg43gy5r9dI95j89NdwN0wm5psYF6p4B5aRotR4QYnjlwc1W ffRFH4JWV/d/AD0KtT4Gsu24iNvUI58LIlT7/RxC+wvawkL1ueiPFiPKzy247cCehU84 dUIAdMSi35J60uVdTZ6853j2WFn2lib0RfXyAUSamqifz1lhPumUpekJ9HZa6A0Ktn6k qTstFMnez43V5aoPC0xwlY8POA78aar38zYKcRqDgu1gWa01sP0SJ58MvDp4cSpmXV+h +hSw== 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=O00fc+i0v88lzrSOPGhnMjcXGMFnyoIrLk5UDjc1Hzc=; b=tHAFOGoiY1dR03EHKygCkwzSslovvDj0SpYe36JD9AmGqsl/0Sg0IV/DrX9Zz809aq QYFa2SJEP4zieTbaD1DETHkbIwYwiz1BpiZJo9WC11wg42Rxwqe5kDrM8YSLx1iNe1DK OOiA2amrJpnvo/ZDtjpnfH/aZx06xvS4MBr4V0K/bNFFWmhYasRs34dUSNqf/o7BGepk bTSNxQOVmmvDSIh0qZheAYSj2e5F7y3hfN7YhE+pzMZ6WjUi+dFNdfbmyUnQ1tS+ws49 Em7ukwRt1yjX3Etsv306JHwGr+h7mn++6aho7yBi0pTDT9OA/mkGNT/47OXvj+12tydl XK3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qFHzsI7q; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a17090a644b00b001cd46bee4c2si7848647pjm.7.2022.04.18.05.24.00; Mon, 18 Apr 2022 05:24:14 -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=@linaro.org header.s=google header.b=qFHzsI7q; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235359AbiDQXYC (ORCPT + 99 others); Sun, 17 Apr 2022 19:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231848AbiDQXYA (ORCPT ); Sun, 17 Apr 2022 19:24:00 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 591B1DE8B for ; Sun, 17 Apr 2022 16:21:22 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id m132so23115397ybm.4 for ; Sun, 17 Apr 2022 16:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O00fc+i0v88lzrSOPGhnMjcXGMFnyoIrLk5UDjc1Hzc=; b=qFHzsI7qeUZ5fXwRmYUP/Hj/wYB5cyybn1IeHlq3kg45OhT4qVStQdEjrrfL/aPFO6 v1sHbifWprmlRKgj7BO9l31IDLY75SF3q+7p6uhINkxsmELnUBweA+afhIm9Q4PEZy43 6+vyksJUIU1SRz4Hi3tihRj0FJPXCpbZVsuQH7Cl/cm4Bru8XKoQTogqvrH3ts3alyft OXGUzUhTh8458s9awnDhx1q+ZjL8rhioQx5xp58ZColvcuAw+3JfY0ByiToRp6MHggS4 pT6eQivpr1Jq7zNq63qOvk3DxaqfFI+kh3W8EJTFj5nyb4nU2qYxLKrvhCkS3fepvz0/ E8mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O00fc+i0v88lzrSOPGhnMjcXGMFnyoIrLk5UDjc1Hzc=; b=LgHjhcoydzphatGxkXKfQ27Ln22Ze6IcFf/cZzzjE3WxR8cDFCSSs2O9o62262p7VB rjKAG6Sv7/jrlyElqJjWicdaKNtaV3QPzS3NSvF1fLvdhYLiiGC5jvXBCn56k6dhBrK0 eTsgRzN6wSqIyRz2gEu+3FwGYWbAygDhTRB9AbqJaE6PceBEyexG/BBhfVfk4Uwn7mMp dyU7DKz+8HjI60WJI7+SJArBhTrE8sJtam+Yyi3GAUjLjkuezJAnmAybCo4DWMbx4hAQ JvOHnamR7oS0E36lrgwdKb0dQ4zeUVGKAHvYY+iMqaUCL4hHDYpN+1tKFTxkEeIKGsT1 UkTw== X-Gm-Message-State: AOAM5333N1MU+IntATEFVP3CaNGfbNSf9D/Glr+kLWMeEOgyqu4ceXL8 oU+cswCzLjT3f0DHjRTTXoAKrlZMlnQFKk1NxPcSHw== X-Received: by 2002:a25:2fd5:0:b0:641:20df:13e8 with SMTP id v204-20020a252fd5000000b0064120df13e8mr8135232ybv.291.1650237681498; Sun, 17 Apr 2022 16:21:21 -0700 (PDT) MIME-Version: 1.0 References: <20220316023356.120595-1-victor@allwinnertech.com> In-Reply-To: <20220316023356.120595-1-victor@allwinnertech.com> From: Linus Walleij Date: Mon, 18 Apr 2022 01:21:10 +0200 Message-ID: Subject: Re: [PATCH] ARM: mmu: fix access to illegal address when using earlycon & memblock=debug To: Victor Hassan Cc: linux@armlinux.org.uk, rmk+kernel@armlinux.org.uk, yanfei.xu@windriver.com, ardb@kernel.org, tglx@linutronix.de, mirq-linux@rere.qmqm.pl, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, allwinner-opensource-support@allwinnertech.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Wed, Mar 16, 2022 at 3:33 AM Victor Hassan wrote: > earlycon uses fixmap to create a memory map, > So we need to close earlycon before closing fixmap, > otherwise printk will access illegal addresses. > After creating a new memory map, we open earlycon again. > > Signed-off-by: Victor Hassan I think noone really noticed this because everyone on Arm systems use CONFIG_DEBUG_LL, and that makes printascii hammer out stuff on the console very early, it even accounts for whether we have MMU on or not. How are you using this on Arm even? What system and what serial driver? That said, it looks correct. Acked-by: Linus Walleij Yours, Linus Walleij