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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F47EC64ED8 for ; Mon, 27 Feb 2023 22:47:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229854AbjB0WrT (ORCPT ); Mon, 27 Feb 2023 17:47:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbjB0WrO (ORCPT ); Mon, 27 Feb 2023 17:47:14 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73A3124129 for ; Mon, 27 Feb 2023 14:46:42 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id C2322320010B; Mon, 27 Feb 2023 17:46:12 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 27 Feb 2023 17:46:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1677537972; x=1677624372; bh=NQTwTZeJYIKblxJmGPxa/pVizrjh Ti57Otr+dFUOe54=; b=l88PS1gtPyP3u9yn2nZNLPFdDPHrU+H+3P/hiz1Ozj7D nNEFCJvHQ1WBzzzjlUATJ3qDz3bctd7v4EO2t5/Ve9auD44z1nl/r2ZCuGJpEsRJ 4omJXjzcvBUY03z9X6IjsVkMWEtHIYYR/+wKPEWJNPv74mgsCCPJcBljzNUkWtaV G7Wv97NWEUHfwpf2NN/x/rldWafJ4A2BYaC1TRWZj3YWHcaYIYUxFz8SKpICmj4Q jGWFixcSaOaZQ0M5Q5zh1AIdBpGGtt0VtuqS7E5dea9yASH3isT4soWwyU+m50DS W56L+/8AS5KT9fLlUyI+HBMWgHeX4U4cRQiaCX4WhQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeluddgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevufgjkfhfgggtsehttdertddttddvnecuhfhrohhmpefhihhnnhcu vfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrg htthgvrhhnpeelueehleehkefgueevtdevteejkefhffekfeffffdtgfejveekgeefvdeu heeuleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hfthhhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Feedback-ID: i58a146ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Feb 2023 17:46:08 -0500 (EST) Date: Tue, 28 Feb 2023 09:48:41 +1100 (AEDT) From: Finn Thain To: Mike Rapoport , Geert Uytterhoeven , Stephen Walsh , John Paul Adrian Glaubitz cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] m68k: mm: Move initrd phys_to_virt handling after paging_init() In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Feb 2023, Geert Uytterhoeven wrote: > When booting with an initial ramdisk on platforms where physical memory > does not start at address zero (e.g. on Amiga): > > initrd: 0ef0602c - 0f800000 > Zone ranges: > DMA [mem 0x0000000008000000-0x000000f7ffffffff] > Normal empty > Movable zone start for each node > Early memory node ranges > node 0: [mem 0x0000000008000000-0x000000000f7fffff] > Initmem setup node 0 [mem 0x0000000008000000-0x000000000f7fffff] > Unable to handle kernel access at virtual address (ptrval) > Oops: 00000000 > Modules linked in: > PC: [<00201d3c>] memcmp+0x28/0x56 > > As phys_to_virt() relies on m68k_memoffset and module_fixup(), it must > not be called before paging_init(). Hence postpone the phys_to_virt > handling for the initial ramdisk until after calling paging_init(). > Thanks for debugging this issue. > While at it, reduce #ifdef clutter by using IS_ENABLED() instead. > > Fixes: 376e3fdecb0dcae2 ("m68k: Enable memtest functionality") I apologise for the trouble caused by that patch.