From patchwork Tue Feb 14 14:07:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13140212 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5329EC05027 for ; Tue, 14 Feb 2023 14:08:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E8B526B0074; Tue, 14 Feb 2023 09:07:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E3AC66B0075; Tue, 14 Feb 2023 09:07:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D037C6B007B; Tue, 14 Feb 2023 09:07:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C3D2F6B0074 for ; Tue, 14 Feb 2023 09:07:59 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7C6B3140DE4 for ; Tue, 14 Feb 2023 14:07:59 +0000 (UTC) X-FDA: 80466076278.12.66569E9 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf10.hostedemail.com (Postfix) with ESMTP id 8E096C000C for ; Tue, 14 Feb 2023 14:07:56 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Fb1OpkD1; spf=pass (imf10.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676383677; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aVaGmk1yURtbn3M9+0tmntSpCwDmHKgnlgIcC5ybYRY=; b=iylJAe7tmOGMg+JYxYV/6Vn69htheSsXhe1k/bmSYFJ70xMHzHfBZ6oLF3z+iP2rL2iHxx 2NEROgO3N/EkAUjCMrOPNSaqIoLfghwnlfKG98GOfcYqMQF67IBFiZlRLyZv1d8lNQvZrS 0D1jU3aNC8lX6ewjovG22pc+kIGqZYg= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Fb1OpkD1; spf=pass (imf10.hostedemail.com: domain of rppt@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676383677; a=rsa-sha256; cv=none; b=fPrwx0Of/KpcleFibwZ6DVVD3CjG8moIeteOo8Ra8hbnMUq4sR0Q48ZQdLG5oCQwQ/+b2o s3tKlo+YN/c99UhTkjJwaxTjtFrPxKKzD4PUHrGR0BybO+UHBJhQgIA2CjBAZy2JqBoMqY nHKZQ1G5k9YTjWeplN+oi4fus4PUW5g= 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 sin.source.kernel.org (Postfix) with ESMTPS id B9391CE2050; Tue, 14 Feb 2023 14:07:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E66BFC433A0; Tue, 14 Feb 2023 14:07:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676383667; bh=hilxX2cQjknwppv7cWUkYn/TC2HNghGbRCGtPZUipXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fb1OpkD1Rcgt+yjx6j0dskJpmYd7Wcm79sGSRVdoifLSQVDsuflzPNK9L15x5pkRv lCXqi9/drSZIXX8jqhBIK6zQ2s7M82tSH7IVmllUviRrFkH9LQovRU98TBMC83lLMz 0gQVQRezqi1LsB9rh2ixY3CfTMSRMqnXqyYZZgn55tOVjr6AalSV851qW1rMEzN2vD 0gbR2lNgvjhFTyt6QFQQ+Wk0UPfnS6RMem7wYAiZchjU8qBEGsjYXSG9xXeSy5vCgy kG0arrNCXb/+ylN6xHu64RF8d0QYnn7414CBeGgFnQC5aXXlPTugLBq2WS4pZBf3J2 vV9SkD2uB11Aw== From: Mike Rapoport To: Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Greg Ungerer , Guenter Roeck , "Mike Rapoport (IBM)" , Rich Felker , Yoshinori Sato , linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org, linux-sh@vger.kernel.org Subject: [PATCH 1/2] m68k/nommu: add missing definition of ARCH_PFN_OFFSET Date: Tue, 14 Feb 2023 16:07:28 +0200 Message-Id: <20230214140729.1649961-2-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230214140729.1649961-1-rppt@kernel.org> References: <20230214140729.1649961-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: kz7tj3rhmpdygg19czshi6quouiupbop X-Rspamd-Queue-Id: 8E096C000C X-HE-Tag: 1676383676-653500 X-HE-Meta: U2FsdGVkX1+XS7jMVMT5yU6Lf6koq/L1eQY5hHgGclXrFScHeWLw6VW5tdMaVk//LK59C/fDrXsObn53+d8UykwNEoqiKC74e/GCODdoUqShsXssIa0q4l8L7bjd6d1u0hcSa+tQ+yf/a4GWN4Xxkk2zaR9bymXjxpfJ6DyiEscvUZOtpEijYMiKtsY1ogZ+l+iWSqEG9ipCVKh5cf9W4BxGf790fLRSm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KnVhx11ryuoZDxGdC0jn7eQO9u0r/Uxmj6OOtPTLKnBtP3vD9Fify22/nGIifWqUBTg1LEsuHkL/Fvd4QrKsQWFPMb6ViCgAZr/owbJj9daXH22i3b4M3cSNz9JtTD/Zd6y9736NnLK4f29VDFhw5Lhpws4CHzLjg1rbbyPM5pKcdcNid03A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Mike Rapoport (IBM)" On m68k/nommu RAM does not necessarily start at 0x0 and when it does not pfn_valid() uses a wrong offset into the memory map which causes silent boot failures. Define ARCH_PFN_OFFSET to make pfn_valid() use the correct offset. Reported-by: Guenter Roeck Fixes: d82f07f06cf8 ("m68k: use asm-generic/memory_model.h for both MMU and !MMU") Signed-off-by: Mike Rapoport (IBM) Acked-by: Greg Ungerer Reviewed-by: David Hildenbrand --- arch/m68k/include/asm/page_no.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h index 43ff6b109ebb..060e4c0e7605 100644 --- a/arch/m68k/include/asm/page_no.h +++ b/arch/m68k/include/asm/page_no.h @@ -28,6 +28,8 @@ extern unsigned long memory_end; #define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET) && \ ((unsigned long)(kaddr) < memory_end)) +#define ARCH_PFN_OFFSET PHYS_PFN(PAGE_OFFSET_RAW) + #endif /* __ASSEMBLY__ */ #endif /* _M68K_PAGE_NO_H */