| Message ID | 20260901214611.60560-4-linmag7@gmail.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<SRS0=xLVH=GZ=vger.kernel.org=sparclinux+bounces-7405-patchwork-incoming=ozlabs.org@ozlabs.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20251104 header.b=U1emJxKZ;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org
(client-ip=150.107.74.76; helo=mail.ozlabs.org;
envelope-from=srs0=xlvh=gz=vger.kernel.org=sparclinux+bounces-7405-patchwork-incoming=ozlabs.org@ozlabs.org;
receiver=patchwork.ozlabs.org)
Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4hZKGK1WBSz1xwg
for <incoming@patchwork.ozlabs.org>; Wed, 02 Sep 2026 07:47:37 +1000 (AEST)
Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])
by gandalf.ozlabs.org (Postfix) with ESMTP id 4hZKGK0KByz4wCp
for <incoming@patchwork.ozlabs.org>; Wed, 02 Sep 2026 07:47:37 +1000 (AEST)
Received: by gandalf.ozlabs.org (Postfix)
id 4hZKGK0B1lz4wDm; Wed, 02 Sep 2026 07:47:37 +1000 (AEST)
Delivered-To: patchwork-incoming@ozlabs.org
Authentication-Results: gandalf.ozlabs.org;
arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org
ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1788299257; cv=pass;
b=VBIWqvD6D5GdSLr3hdF7GGAlgPdvk1udwgy3OiZIJ2x2HPsf5FqJ7jV+vCBhfVigS/yubmFRFerDofW+VQoPRDxNnquIcfSGnKTJnxDlBBR0cGNXhSvu2aYPGW3ybJyuFLcnuX5Sz7c0DIPE7LyeBxwo5vymjXJ1DCF/gDcJ7LGk4xbO8cBNRAb7UXKowoEnvlHyYIO7aCMJQzU6RPOg37wSPfQOb0v0YY5XN/eByk0kHswgMe7kY7jyOhE3pbEA862pM4diY65kDnWGGGkb1gfKq0qxWP1pA3clrctoedQLTeitx7h7Isf8I1KDx3xiiDGdb4whijEA1qBe+mlLHA==
ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707;
t=1788299257; c=relaxed/relaxed;
bh=uJ7HB4Zmwe3amRULeH6fSoLAudldxAC6NdOXYXWuTOQ=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version;
b=w3NE8Wz/rlh6C1xuuKO4uLoPa04Uh8H2VzHhc6WpePLXOhtX7TZf9iicvry0SAVlDnbxLlxyBETEti1U8x7h+J6lkt+GEn3be9L3gSLbSaqrnMkh4wrmuO0RbE24bE5hbJnEY7AQFiU8p7NUAcLYAiFcVLv1vvzAPxbakLki6QltwGHrKg4pQlvyzmYK7o8ueuW3z0ICl80CALfwPXManzzJRhubEbw2mxfdBejISTMckHKt1LynFv5B7oa7+DsrSCw887QddBWbZAk6PtoSHBTrvajoTFZV1nOKE/Wf6NLdBGwizpO2tHql4O5l9PzRiUzQocu59S9VL+sDwH8R1A==
ARC-Authentication-Results: i=2; gandalf.ozlabs.org;
dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20251104 header.b=U1emJxKZ; dkim-atps=neutral;
spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org;
envelope-from=sparclinux+bounces-7405-patchwork-incoming=ozlabs.org@vger.kernel.org;
receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org
Authentication-Results: gandalf.ozlabs.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: gandalf.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20251104 header.b=U1emJxKZ;
dkim-atps=neutral
Authentication-Results: gandalf.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
(client-ip=172.234.253.10; helo=sea.lore.kernel.org;
envelope-from=sparclinux+bounces-7405-patchwork-incoming=ozlabs.org@vger.kernel.org;
receiver=ozlabs.org)
Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(No client certificate requested)
by gandalf.ozlabs.org (Postfix) with ESMTPS id 4hZKGF43SYz4wCp
for <patchwork-incoming@ozlabs.org>; Wed, 02 Sep 2026 07:47:33 +1000 (AEST)
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.90.174.1])
by sea.lore.kernel.org (Postfix) with ESMTP id C001F48BBC
for <patchwork-incoming@ozlabs.org>; Tue, 1 Sep 2026 21:46:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 41D7141378E;
Tue, 1 Sep 2026 21:46:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b="U1emJxKZ"
X-Original-To: sparclinux@vger.kernel.org
Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com
[209.85.218.46])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5E4144A3EE
for <sparclinux@vger.kernel.org>; Tue, 1 Sep 2026 21:46:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.client-ip=209.85.218.46
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1788299203; cv=none;
b=DVQAg64CDVyJo1ZogEN2Yveh9FtsbeE1d31NA87g9r8yfh4/YdOuBpR0PCDIou1Dea68ug6oZs3r8NEiAGa5m0DSaRCpW/JNSnkcP8Fh1AXAUpd3ghQHvEdzKMmmfv5nbdVuAZygfCGrsXaPcmxOUfwp93yb47Ui9h+lkOxJq44=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1788299203; c=relaxed/simple;
bh=VmbFlELFJ3Rn+I0JOfMdlDLEE3OEnrmuWAkyZTBARKw=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version;
b=ATPVoCsfYQbNM1iZhVVUvDw1NqGq4UYLh4aLpjhSUG89pijmj/WAVdFNYldJJVSGJmiz/PC9IBIU4RZRwckMG7u5yESj49i4nZDomwkQnDsPHeNBzIn1Bw2tw6HLlVhuK01ufvuype0YvxOBpS5LyMe+7Q0eH8YtptJD5Lu6VLA=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
header.b=U1emJxKZ; arc=none smtp.client-ip=209.85.218.46
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=gmail.com
Received: by mail-ej1-f46.google.com with SMTP id
a640c23a62f3a-c2544ff970dso37532666b.2
for <sparclinux@vger.kernel.org>;
Tue, 01 Sep 2026 14:46:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1788299200; x=1788904000;
darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=uJ7HB4Zmwe3amRULeH6fSoLAudldxAC6NdOXYXWuTOQ=;
b=U1emJxKZL//hS/mmCC/CoUxxCJeKsV5aRjHLMPZcqIiLPM8Y0pDao3UOvbrJ20joq3
8UTd1pCr9lVT6Zgk9C2jMgzKNQyM4a161yVOzAxEagafd5Igp6cyFbt63jhV0F/AMF7d
WPYScR6OvmQWrMbVUDopRcf/1mNUf2j2Ny0n18fgp/n4DsNLPKas5iwQ9tuBR8Tk6zec
0EXe0Y42xFGDVfud/gel3n+eKY+nLRT2ce/h1JnS+eeHBM93dXlTDNVKQj6vHSySoF+R
wCm4GVb7zFPhw97hmpt0CGYJuYGiX1B/5iKd6hOzchlLzuuCCvNdjnfEK6sYhP0OWMfq
F1jQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1788299200; x=1788904000;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=uJ7HB4Zmwe3amRULeH6fSoLAudldxAC6NdOXYXWuTOQ=;
b=hZzwczLpbg//WoGFZImtNjldP9yQJHerC+76SFpF8WlvbeV7//OTFr9lj4FRzJoJu5
R8C0FtKSmu0izKn/Yv3l8kNwHsK1iyrRj3WsUsPlxzjFlJcdjR5xZ22ujahcPJ+Y2el8
v3h5TEtLEJFuuwOsQu00nZM3dijqL3j+kbpkXRUuIWNJUp6dqn4975YCn9IaxweBSJJV
bEgAqvmWnJvXzVTrVHhaKrTesJplDFFixY5WeeViaXpshNGiVBtwVMV7sLAHdmw/heEp
0NEsCbcPd00kXA+ePXzp5CMtP9EZORqkAsRkkMO1g1W4IVC8kG3Gkz9q3bMjJlH/jt1t
XuxA==
X-Gm-Message-State: AFuF++nhrH9/D2P2v6EQMKKSZc3DCYRbggTA7wZL9qhkBF8CuAj1gW3Z
4VaD9UmgE8FyuAo98fXSRThRUbq1xB8acAxsP+Re7TFtrlLxsXJFfmMcO+oGKw==
X-Gm-Gg: AR+sD100FNCoE5YRr7A0MAMB3O4hMjnm2HrnL4VL737FdYn3/rL2H9kH5SU1TiTX3kS
9bes7nGQ9hYcCJlzJxyKbnYKVA6q2OJRC9vvaUhTfuZIDXK0IWRTJ9aYrKOEh5qI5UV2uE+bDyC
9zwKJ16E+Ob2hfWHKDAUC8mfxv7aUV7eCVkF7z/+NOKkXPKXe2xZKdI2twg0Z5KsMF+kkFvrrRY
UCCeOhAcIOgsrmMxAbORod0IOMwGFvNLSHYb620Zrl6YaCyIaZrhu1DmLrxHU8ms0gmknJdaxhk
td8wdGa+wqov1JagmwrEEMholVoeQ8edXJ24m6TBnAgEOC0h53DXDKWe3xpHn+nLCeLmYnUkpl3
pmPrPuzvp/DOixMdfjSfcLvitQl/Z3w9D8lbjBe8wWV71Y1aQ2djOQ65MlaDwv47VRxSs1ga+Q7
wD9UNFYSJ+l81EJVEbwEEl/Q/+c41jrxCcMVzjroPcHQZaxUhQHzCvjxYBQhIw3LYGIbdt/wjzI
GBgkZXdEzupvAfQy9yM3Kj5+C7Ddk0=
X-Received: by 2002:a17:907:80c:b0:c1c:5aa1:de57 with SMTP id
a640c23a62f3a-c25d548f0ccmr12610166b.13.1788299199717;
Tue, 01 Sep 2026 14:46:39 -0700 (PDT)
Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8])
by smtp.gmail.com with ESMTPSA id
a640c23a62f3a-c25cffc70fdsm27500866b.4.2026.09.01.14.46.38
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 01 Sep 2026 14:46:39 -0700 (PDT)
From: Magnus Lindholm <linmag7@gmail.com>
To: sparclinux@vger.kernel.org
Cc: davem@davemloft.net,
andreas@gaisler.com,
linux-kernel@vger.kernel.org,
sam@ravnborg.org,
glaubitz@physik.fu-berlin.de,
Magnus Lindholm <linmag7@gmail.com>
Subject: [PATCH v3 3/6] sparc32: populate memblock from the PROM memory map
Date: Tue, 1 Sep 2026 23:45:47 +0200
Message-ID: <20260901214611.60560-4-linmag7@gmail.com>
X-Mailer: git-send-email 2.53.0
In-Reply-To: <20260901214611.60560-1-linmag7@gmail.com>
References: <20260901214611.60560-1-linmag7@gmail.com>
Precedence: bulk
X-Mailing-List: sparclinux@vger.kernel.org
List-Id: <sparclinux.vger.kernel.org>
List-Subscribe: <mailto:sparclinux+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:sparclinux+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,
SPF_PASS autolearn=disabled version=4.0.1
X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org
|
| Series |
sparc32: replace sp_banks with memblock
|
expand
|
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index e0e66f91ceeb..75050dfbc2ea 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -165,6 +165,9 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) memblock_add(sp_banks[i].base_addr, sp_banks[i].num_bytes); } + if (cmdline_memory_size) + memblock_enforce_memory_limit(cmdline_memory_size); + /* Start with page aligned address of last symbol in kernel * image. */ diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c index 269d6ab5ef5e..59962bc0bc82 100644 --- a/arch/sparc/prom/memory.c +++ b/arch/sparc/prom/memory.c @@ -7,6 +7,7 @@ */ #include <linux/kernel.h> +#include <linux/memblock.h> #include <linux/sort.h> #include <linux/init.h> @@ -23,6 +24,7 @@ static int __init prom_meminit_v0(void) for (p = *(romvec->pv_v0mem.v0_available); p; p = p->theres_more) { sp_banks[index].base_addr = (unsigned long) p->start_adr; sp_banks[index].num_bytes = p->num_bytes; + memblock_add(p->start_adr, p->num_bytes & PAGE_MASK); index++; } @@ -42,6 +44,7 @@ static int __init prom_meminit_v2(void) for (i = 0; i < num_ents; i++) { sp_banks[i].base_addr = reg[i].phys_addr; sp_banks[i].num_bytes = reg[i].reg_size; + memblock_add(reg[i].phys_addr, reg[i].reg_size & PAGE_MASK); } return num_ents;