Message ID | 20230214140729.1649961-3-rppt@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2998472wrn; Tue, 14 Feb 2023 06:16:46 -0800 (PST) X-Google-Smtp-Source: AK7set8ZDA3EqAKriXAZk6CG+g7g0j/XlCNpEDrw2a7B5tpyWXLu4V927vC+Y2LIy2z2QB+VdEfd X-Received: by 2002:a17:902:d4ce:b0:196:49a9:bf26 with SMTP id o14-20020a170902d4ce00b0019649a9bf26mr2986275plg.15.1676384206432; Tue, 14 Feb 2023 06:16:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676384206; cv=none; d=google.com; s=arc-20160816; b=XoHjHj9zE1Vg50tdV0KtMrWyoEHqDpSoSGy1qG3UJTAgsqMZCsunQGIMU1gxtJmv9J JxXYslpc9zMvqmDfsNh5FZCmznsi6s03N+VTRnYbzIap/3JoQh1ETnF4WKJqJDgG2D3i 8kT2rmp8kPBsy3Yay4pqtkwPTMR1N1P4vwyKP4Vz+HO5NI5xffBwyTllUptvaHQrJfjL 86Y0g5sh2iLrQuToHwWfg9TtVVfxQmkcBKjIWSQfY/lgKKBIbsAUUAvjUWvqXPBx7Ya4 6xWCOH0tgGskR8ADpC81Fw76ZL6NMguTzguvroaGT7MY7mDEhgVDOAj/UXV1y0mZIxE9 EMbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hhMq3S/oK3zmHM6mECWJ3kOuXpuXOpWnzY9XqYs6QPk=; b=BZ5o9nYVj9roNQ5YWjDjslJvtHhOX5gKkNq/Wz7qPwL0mY7fglL7npTb3OdyHh3F5D mmYaJzC+FcFwjqmifqspUdasOrBZNs2WdKK5tz1G4CH+8dDk1vHwiX2f5WFF2SyuIfkr iUzYmmPr33ahIXxkRTKQvzkfJW1ADxYceQYC7e6EsLmLhV1VAWc+zlHMhfMGz2E2vG3X 4V6lKWfeKXkpG9rYGcaiN1bmnasQdSwRhnjCF8X0JTJM9trCCsju6GZyts8ggsmpRrXu evaFh7iOulc5G7EHkKPi9k4bScF40AKBCmnFXJvjHtha0wcQZ9s9OEuOM0wFouR1/bWM cIbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s9uEH0FY; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a170902d65200b00189e752b2f8si11746815plh.328.2023.02.14.06.16.33; Tue, 14 Feb 2023 06:16:46 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=s9uEH0FY; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233217AbjBNOOd (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 09:14:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbjBNOO2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 09:14:28 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78A606A6F; Tue, 14 Feb 2023 06:13:58 -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 sin.source.kernel.org (Postfix) with ESMTPS id D4CC3CE2065; Tue, 14 Feb 2023 14:07:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D563C4339B; Tue, 14 Feb 2023 14:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676383670; bh=OaKxI8asQTEjsEh6yfL74O5y0APlN8V2pOfAUwHuYPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s9uEH0FY0E59Lne0jrBhkQf1M8apaJ4Q5qecHu2ul3FABQgIuCLiaX67MlXCfJKIP REV6oT63TsGh2uzEnR6pEqfoZS/Mv7zRh0jY/1seyA7HVtaFiEkwLPSSIQymvZhD5j vC2hiiI/90K3ubqTQezm+4Z8s6GsfriFu3fYHCGHgITD9g9h8cIqdv5DgxHYPrg1hg 7FkupLjpl02YxWT7EReno9nxekdM9ZnEy7IPxyjT7xBJ0MY/nWbprKqXaRz3c9bqGI J5CcAY5uJxb5lb/c/PCC4VM2plmW+gV10L7/SI1cUyuoL+hPjrQuQO771g7J/kD01N b4DjHYylyTrCw== From: Mike Rapoport <rppt@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: Arnd Bergmann <arnd@arndb.de>, Geert Uytterhoeven <geert@linux-m68k.org>, Greg Ungerer <gerg@linux-m68k.org>, Guenter Roeck <linux@roeck-us.net>, "Mike Rapoport (IBM)" <rppt@kernel.org>, Rich Felker <dalias@libc.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org, linux-sh@vger.kernel.org Subject: [PATCH 2/2] sh: initialize max_mapnr Date: Tue, 14 Feb 2023 16:07:29 +0200 Message-Id: <20230214140729.1649961-3-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757816245696169565?= X-GMAIL-MSGID: =?utf-8?q?1757816245696169565?= |
Series |
fixups for generic implementation of pfn_valid()
|
|
Commit Message
Mike Rapoport
Feb. 14, 2023, 2:07 p.m. UTC
From: "Mike Rapoport (IBM)" <rppt@kernel.org> sh never initializes max_mapnr which is used by the generic implementation of pfn_valid(). Initialize max_mapnr with set_max_mapnr() in sh::paging_init(). Reported-by: Guenter Roeck <linux@roeck-us.net> Fixes: e5080a967785 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM") Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org> --- arch/sh/mm/init.c | 1 + 1 file changed, 1 insertion(+)
Comments
On Tue, 2023-02-14 at 16:07 +0200, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" <rppt@kernel.org> > > sh never initializes max_mapnr which is used by the generic > implementation of pfn_valid(). > > Initialize max_mapnr with set_max_mapnr() in sh::paging_init(). > > Reported-by: Guenter Roeck <linux@roeck-us.net> > Fixes: e5080a967785 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM") > Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org> > --- > arch/sh/mm/init.c | 1 + > 1 file changed, 1 insertion(+) > > 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); > Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
On 14.02.23 15:07, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" <rppt@kernel.org> > > sh never initializes max_mapnr which is used by the generic > implementation of pfn_valid(). > > Initialize max_mapnr with set_max_mapnr() in sh::paging_init(). > > Reported-by: Guenter Roeck <linux@roeck-us.net> > Fixes: e5080a967785 ("mm, arch: add generic implementation of pfn_valid() for FLATMEM") > Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org> > --- > arch/sh/mm/init.c | 1 + > 1 file changed, 1 insertion(+) > > 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); > Reviewed-by: David Hildenbrand <david@redhat.com>
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);