From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Date: Mon, 13 Feb 2023 09:54:17 +0200 Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5706C64ED6 for ; Mon, 13 Feb 2023 07:54:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbjBMHyo (ORCPT ); Mon, 13 Feb 2023 02:54:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjBMHyn (ORCPT ); Mon, 13 Feb 2023 02:54:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD259422A; Sun, 12 Feb 2023 23:54:42 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 4871F60EC3; Mon, 13 Feb 2023 07:54:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3884FC433EF; Mon, 13 Feb 2023 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Date: Mon, 13 Feb 2023 09:54:17 +0200 From: Mike Rapoport To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Huacai Chen Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Date: Mon, 13 Feb 2023 07:54:17 +0000 Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-Id: List-Id: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Huacai Chen Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. 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 31EA6C636D7 for ; Mon, 13 Feb 2023 07:55:05 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JTql+OvokAo+GtOUw8yQM0+al6wSyIZP8kbh64Xi9bg=; b=IyDkwADdc7L7tl ADvGtDKy2uEDGQgAkDc3EdDztEqmlIuoNRo+lqcTuLMf2P0qlf2M1dJRdbYQmlG3qKyCTPs8dp5/C OVSU0j9i0a3O9vUGZVQFNGeaVlCEomfE2121qbyTqhlXKEIA2gGi/fCbAr6x4EGm9/QAN5Z3Gj14/ 4acyU8B7FS3WbCKx8aGpzUlQK2g4ty8rdcAyBqQVwHlSlS5/dCYH2FjU1OJKMmzVUqmlAs/Aqi+Hf zYq8qZ7oT0/QPJBWMu73jgrzKMHCjKsXJlYMLkth1W5brdKO5bFAZhe/akjmfhZUeaiaR++KCTYdl JrvAoIAj8B8v8UQdK0bQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTfr-00DUjn-QN; Mon, 13 Feb 2023 07:54:55 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTfg-00DUfw-Pu; Mon, 13 Feb 2023 07:54:46 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 16B7EB80E01; Mon, 13 Feb 2023 07:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3884FC433EF; Mon, 13 Feb 2023 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Date: Mon, 13 Feb 2023 09:54:17 +0200 From: Mike Rapoport To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Huacai Chen Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230212_235445_150099_44B54399 X-CRM114-Status: GOOD ( 21.65 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 469D9C636CC for ; Mon, 13 Feb 2023 07:55:00 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8fvArTnKBiLpRoRVsam7jB6zTLg4Fby9rsdybqUC2e8=; b=Yl2pW51kkI6HOb chgsNbpB2NGSJk5mzqZQWNPSGCRK6Dl4m7Zd8qRtyW/NURNmc80xHgRTTxgf4egv15CXkVxnZjg8t xwa9/q/yBrTmqVaX4b6YaxYCCPSvkYZMzpse5uvti91rL3JYM/KYpGeCgoQGHP2vSaJpUqWaVyI7+ 9lA4tkTvHnk58Hhq13kHas59PeeRbt0fCrgByUI29Hh4CxnrRRenNO9CRq9U6Yk/l/CVnDRKSGdiC Zeq5pPzwL3NO1mbD1DUflkTAvltvHNM2NZiR0djKadRxivbWkn1aRJ5IPMoVJ6INHeTmZTTl4dmqk rOpLoQBb0aM2zMNi+VlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTft-00DUkJ-Df; Mon, 13 Feb 2023 07:54:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTfg-00DUfw-Pu; Mon, 13 Feb 2023 07:54:46 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 16B7EB80E01; Mon, 13 Feb 2023 07:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3884FC433EF; Mon, 13 Feb 2023 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Date: Mon, 13 Feb 2023 09:54:17 +0200 From: Mike Rapoport To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Huacai Chen Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230212_235445_150099_44B54399 X-CRM114-Status: GOOD ( 21.65 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc 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 C0561C636D4 for ; Mon, 13 Feb 2023 07:54:59 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nk3Nt4LU1+fDFOwvcbqKPXMk3LIAaLJMHA53M/D4kwc=; b=I4Uc/mE2nYC7p3 d+6CEoY/SnOiZZQRfV6M2hXN5vE4lSwBGtp7XhmXA9HgSnMHEWcSHbJVRrMaCoAuxD9ZIt2lnsgMU lxd52lmhNj65CIQntSQr5wawAwzxkYu11XVidN8N2Wmv7Kk+XHtOo8u71XwphF4h3wIp2P7S1bWaK rqMNu9wkMpaKMnTIwljL0M2lIsuejly9TCZeae7mIDq8B+v9UWr4TVEZJo9YqGiMC3LxD55PmxJIB Tm48eLI6Sk5NTlamA8cUZVpk5PP1c40Z4auDPD87m5/+QvhSAVgFL44npFsgN9iWztkHjCIuCprvE 2aqNqe5YG5yWnmBflMjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTft-00DUkV-Lp; Mon, 13 Feb 2023 07:54:57 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTfg-00DUfw-Pu; Mon, 13 Feb 2023 07:54:46 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 16B7EB80E01; Mon, 13 Feb 2023 07:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3884FC433EF; Mon, 13 Feb 2023 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Date: Mon, 13 Feb 2023 09:54:17 +0200 From: Mike Rapoport To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Huacai Chen Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230212_235445_150099_44B54399 X-CRM114-Status: GOOD ( 21.65 ) X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 3835BC636D4 for ; Mon, 13 Feb 2023 07:55:45 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4PFc8b0FDgz3cFT for ; Mon, 13 Feb 2023 18:55:43 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=P/NLBLn1; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=145.40.68.75; helo=ams.source.kernel.org; envelope-from=rppt@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=P/NLBLn1; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4PFc7W2PsCz2x9J for ; Mon, 13 Feb 2023 18:54:47 +1100 (AEDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 16B7EB80E01; Mon, 13 Feb 2023 07:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3884FC433EF; Mon, 13 Feb 2023 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Date: Mon, 13 Feb 2023 09:54:17 +0200 From: Mike Rapoport To: Guenter Roeck Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, x86@kernel.org, linux-mips@vger.kernel.org, Max Filippov , Guo Ren , sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, WANG Xuerui , Greg Ungerer , linux-arch@vger.kernel.org, Yoshinori Sato , Helge Deller , Huacai Chen , Russell King , linux-csky@vger.kernel.org, Geert Uytterhoeven , Vineet Gupta , Matt Turner , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, loongarch@lists.linux.dev, Stafford Horne , linux-arm-kernel@lists.infradead.org, Brian Cain , Mic hal Simek , Thomas Bogendoerfer , linux-parisc@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dinh Nguyen , linux-riscv@lists.infradead.org, Palmer Dabbelt , Richard Weinberger , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Huacai Chen Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. 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 3DDC8C636CC for ; Mon, 13 Feb 2023 07:55:46 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C8a3wkJZwwpC1oIU2+x/Lh0caR6ZrnqQI3MLMIIYvN0=; b=B2qxTVKcpW8OKN OaKoBrwRcry2N0m9m7P+zqGm1ih7EAsd6mr7e2ckhlLyjUqiG1oNM+ZQ+xCnT4q1hRpH0Acdx1VLw FbLK0Gj1aUH6c95edzFs087CZRr59r7ZNv1I1kEGwjt72mpLt77YYAXwv8BHcGvAC6fVve0J3e4oC 8gy+MDBxqmgwbi9+6DrSmBw5D1XvsvGHo8/cZK2XX7LPJe0YjDggBgbqUiFtuZlppi81HSt2Prg/b E5214RHxoljlbN4rgO1ZXOacctI2hjVtIALLBUdwO1atMCgrs1+uTiJ5r/Xyot9BQ2ebntZ+vzt4l Z8QM1t6EWOMCseGtkjyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTfk-00DUiF-H9; Mon, 13 Feb 2023 07:54:48 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRTfg-00DUfw-Pu; Mon, 13 Feb 2023 07:54:46 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 16B7EB80E01; Mon, 13 Feb 2023 07:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3884FC433EF; Mon, 13 Feb 2023 07:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676274881; bh=6metnuiv9QkmKFu+JTHLVBvZLre3nFtuNi3AR7PlA78=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P/NLBLn1QBccO0iLmwEVdjTRTOu/1JTVdr0CvbgYz4ThLcAoENpkQwi1mRk7/P19V Brn+rbVYSD8LBBQWtetps+o6x9tV427CYirqerxd+gmGggehAz5OXTZeiD3MkT7U29 s/as2HenQlPGtPPTTf3fp/G4jLA+MmtrrPcey6hAK36CzGgOAg/0LtwnODYIfT0DI9 MUeph4dw/P2V8jMyhN9SftHlhcEV/JNhGKIKb6cMv7netYSdbt356AlVVkhPoiPUvd r4aExWVaj3CL3McIngU/VdH3ENcuJwfiC6rBQVcgRCzZo3MtbE8U1j5N/4s5pn2pxp sfCWQJUUPJk8Q== Date: Mon, 13 Feb 2023 09:54:17 +0200 From: Mike Rapoport To: Guenter Roeck Cc: Andrew Morton , Arnd Bergmann , Brian Cain , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Greg Ungerer , Guo Ren , Helge Deller , Huacai Chen , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Palmer Dabbelt , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Thomas Bogendoerfer , Vineet Gupta , WANG Xuerui , Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, x86@kernel.org, Huacai Chen Subject: Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM Message-ID: References: <20230129124235.209895-1-rppt@kernel.org> <20230129124235.209895-5-rppt@kernel.org> <20230212161320.GA3784076@roeck-us.net> <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <15a2c023-fdfa-9543-ac36-a846e5f8a000@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230212_235445_150099_44B54399 X-CRM114-Status: GOOD ( 21.65 ) 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-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 Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > > > > > Every architecture that supports FLATMEM memory model defines its own > > > > version of pfn_valid() that essentially compares a pfn to max_mapnr. > > > > > > > > Use mips/powerpc version implemented as static inline as a generic > > > > implementation of pfn_valid() and drop its per-architecture definitions. > > > > > > > > > > With this patch in the tree, sh4 and sh4eb qemu emulations no longer boot. > > > Reverting this patch fixes the problem. > > > > This should be a better fix than a revert: > > > > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > > index 506784702430..bf1b54055316 100644 > > --- a/arch/sh/mm/init.c > > +++ b/arch/sh/mm/init.c > > @@ -301,6 +301,7 @@ void __init paging_init(void) > > */ > > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > > min_low_pfn = __MEMORY_START >> PAGE_SHIFT; > > + set_max_mapnr(max_low_pfn - min_low_pfn); > > nodes_clear(node_online_map); > > Confirmed, this fixes the problem for me. What is your preference for this and m68k fix? Fixups on top of mm-stable or v3 of the entire series? > Thanks, > Guenter -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel