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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91023C43334 for ; Fri, 17 Jun 2022 13:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:From:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FcL5Rs2iUBPX5+1OwqDcI35yx32ziSiBCJ05uDLO5Vk=; b=D/c+1RAqsjHzq+ IAtCaMMjnzNn0WFMhc6pl/iDzJjC9OO4plk5/h6RBFGZiRtkByvPzBVq+WV20iHMpwwKWMeG3x5pP 5r5sx6FbtK51vwgyLUrh//B+jAV1SnlD8lq9nEnEAp1O0lYp84FHDzOfXNBxziLXNuWvOST8OnaKF uk7LyBsWd3QYuQ01QBnsNCk7QzY+t2E2EU3JYQip4VWdhoOJvWazgsACfaHWhe6eRy+1u4pGKhpUI L1MYi0nm93122t5oxXdESUtolszSbedGsQOUvCZjHTt8NQ0IaK2aWfjsA3whDq47PWHmHapefjccI yiu6a/SQbwnE9+SbEhyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2C4j-007pcL-48; Fri, 17 Jun 2022 13:31:49 +0000 Received: from out28-77.mail.aliyun.com ([115.124.28.77]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2C4d-007pau-VX for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 13:31:47 +0000 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.09729436|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0811532-0.0012695-0.917577;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047192;MF=victor@allwinnertech.com;NM=1;PH=DS;RN=10;RT=10;SR=0;TI=SMTPD_---.O76jcEA_1655472657; Received: from 192.168.220.136(mailfrom:victor@allwinnertech.com fp:SMTPD_---.O76jcEA_1655472657) by smtp.aliyun-inc.com; Fri, 17 Jun 2022 21:31:31 +0800 Message-ID: Date: Fri, 17 Jun 2022 21:30:57 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] ARM: mmu: fix access to illegal address when using earlycon & memblock=debug Content-Language: en-US From: Victor Hassan To: Linus Walleij 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 References: <20220316023356.120595-1-victor@allwinnertech.com> <0fa192d1-b6cc-4a8a-c319-36471cba79e8@allwinnertech.com> In-Reply-To: <0fa192d1-b6cc-4a8a-c319-36471cba79e8@allwinnertech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_063144_260272_B7793A49 X-CRM114-Status: GOOD ( 13.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/18/2022 11:08 PM, Victor Hassan wrote: > On 18/04/2022 07:21, Linus Walleij wrote: >> 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. >> > Hi Linus, > Thank you for the reply. I used earlycon, in early_fixmap_shutdown, the > base address of earlycon is in the critical stage of release and > reassignment, so early_fixmap_shutdown -> create_mapping should not call > earlycon in this process, and create_mapping has a lot of conditions > that trigger print, memblock=debug just makes it easier to expose problems. > >> How are you using this on Arm even? What system and what serial >> driver? > I'm using serial driver 8250 on arm32, with cmdline: memblock=debug. > CONFIG_SERIAL_8250=y > CONFIG_SERIAL_8520_CONSOLE=y >> >> That said, it looks correct. >> Acked-by: Linus Walleij Hi Linus, Sorry to disturb. Is there any question about this issue? Thank you :) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel