From patchwork Thu Aug 1 06:08:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13749632 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 3529DC49EA1 for ; Thu, 1 Aug 2024 06:09:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BB4526B008C; Thu, 1 Aug 2024 02:09:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B64776B0092; Thu, 1 Aug 2024 02:09:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A54236B0093; Thu, 1 Aug 2024 02:09:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 87CF46B008C for ; Thu, 1 Aug 2024 02:09:25 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3FF6FC0849 for ; Thu, 1 Aug 2024 06:09:25 +0000 (UTC) X-FDA: 82402649490.02.252B8D6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id A01DB140017 for ; Thu, 1 Aug 2024 06:09:23 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=bucdLnSW; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 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=1722492558; 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=9FVQIJBvwpLpWnxssYSpgj10sNF0Z4o30ZuUMNufdPk=; b=iM/Ru2yTHjudLka3+8WAeOxKaOAyBXzUfaBSVgYxG8vFbAwht19bwgn0FX7Q8gEx8Afvzo a5B+26hEAvYIomrWobTQZJacgp43Cdlnaha/Y8ExZ0AMb+/k4ziZo54qBoD6s03zHigpYO Tw6xrs1NgqOGdgE6IOGqAox/I/5W5rk= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=bucdLnSW; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 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=1722492558; a=rsa-sha256; cv=none; b=uxZtEFnDbv5Ah5Tkx0p22h9RqdfGbe2XBpK74hteGZ5W9csImKya0BFJFZD3y4AZN3uRu/ N6dM+WhRmzZrkR0acheVDpTzjkZMGClJW4gprSjL3byRz4ZlMupRxu8GhmxZhPmxF+lMUB +M+HySSvBbj2Or8273I0GeD+KYuqWmM= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BFDE362772; Thu, 1 Aug 2024 06:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A06DC4AF14; Thu, 1 Aug 2024 06:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722492562; bh=mRZLqq2N2ryJ5ZO7g59g+rrLvkwOpPlbSt8yNKJxh4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bucdLnSWpcdcRT5+EXB/9Vj9t5MS7Qn5CSNmaKRNv6NvVMt0IwHITPfQUHQKw5W4m KADunInG9ypv2EkiXb1dRp15PO6S9ZkhHC5orlcNDwZxNq0LAq7vdXnHs51UeN8XC1 qCCdGkD+IwBfa9Dhu62NGSOzskzofKuRJmzlYh8EWIjKqjsCMlnSFjv0suv/LWA7bE /v17MsWN6GsK6hkUk2PpkklVDGARhQKEyYhJxEEdEsm6jaYBM6ERY08yC3+8fZvikl QSv5CNmiG7++F2AcsgKSBHXAeR922kJ8/hbCjc1GagkI6K0Ok0uQtB2agu2yqJ1ylk Nz7e1f94h+Kfg== From: Mike Rapoport To: linux-kernel@vger.kernel.org Cc: Alexander Gordeev , Andreas Larsson , Andrew Morton , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christophe Leroy , Dan Williams , Dave Hansen , David Hildenbrand , "David S. Miller" , Davidlohr Bueso , Greg Kroah-Hartman , Heiko Carstens , Huacai Chen , Ingo Molnar , Jiaxun Yang , John Paul Adrian Glaubitz , Jonathan Cameron , Jonathan Corbet , Michael Ellerman , Mike Rapoport , Palmer Dabbelt , "Rafael J. Wysocki" , Rob Herring , Samuel Holland , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , Zi Yan , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, nvdimm@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org Subject: [PATCH v3 03/26] MIPS: sgi-ip27: ensure node_possible_map only contains valid nodes Date: Thu, 1 Aug 2024 09:08:03 +0300 Message-ID: <20240801060826.559858-4-rppt@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240801060826.559858-1-rppt@kernel.org> References: <20240801060826.559858-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: jchoog1bncr61djw38hitwb687nho83z X-Rspamd-Queue-Id: A01DB140017 X-Rspamd-Server: rspam11 X-HE-Tag: 1722492563-812228 X-HE-Meta: U2FsdGVkX1/OWQsCzWmu54SIMBpm6qyqSUzIZfFeaBO6oIUO/SXyqzXzmvwYqItLiq0CqUjhTZxeB8VlQ0dy8TMTcLezc1PCUGAtFWRYXDWwh3YQaJzu0FdHq2T4dVCKW2ba36GyvJS/gqrCgdL1foKo5hlwfia6K8ioTAVHxzCYrwmg6FaVVabqQiK0zg0QG8SBmtJR8y4odEt6UUoEsCqpPAivx7ZOtc/kJfxiz8KQVJ3BVCVKNHttzFXg4z01BUu6OVcTmkuXO0VT2Pm9LVfbVVvkCZhdZFBjlm3uOnli/f/E5gjmlVDDtdqxf4WVy3sDRAlLDrNP6z1kQlHu+5QPj1RQ0r7SPljAGrmlA013KzBz9qO4Je6OT0Vf75BN2y0m0uEtKnwQMpKPWYzDcLkoq78rW1N9JfpeA+o8G8iIE6j4CLCTLncCt+zPtcTLDGShPewF9LEnPtU7obAwvQyokCZTuPA1Zb3gq175EieztVLz1TfoJNo7PGSxP0cmkiliGBa21eALcgoNwuQq70kkPDmUmsIztGDMCL4PA7xl2pmTv8qTorNo07wa1b978OjQsMjeSTTPaf4UnwbKCeYQgwYKfcbsdNseYe4kO3+p6O1ySsXYX34k/R/z8t1NpH3h1Xvg9fDuCIxRpZG6zE96LyuCEx/cadXU7H3YhseyqCO95zk3QmTuJdtlk2XgfEVWqshA0iVA5wEMyvtEscx8CXjdzNuDyay9tJlsD1B9W/6NXrQZ4Hm5bdJwUbxCJ7ZU9iX3Bbei5h+7JbHdKFe00IdDj/6c8hu5SQDKGmOPC8Y6o+xXAxu3QO2kS+A+xK0nISkIxe+rV+rQHlY2qzSKvKMyRBKHWI9as7HGuxIbx2xWG2mrtYkh/iU35q4jdDZieKRqPCU576zTidjQgm+0dGahyct9k4I0o09ZUlXlNljloK/IdkvK50wyXxvlv7DTBUl+2/LyYXCEysg AIN0UTZX ZYPw3NWv1hlVqIqAIt6tFhtYi5F3XLCJyEG3h4g8JtMP82H82gIVSvmEY/EH5oFBg27XSooUlO6LCT0IQq3MBBulgCKPvr24WA9sSQUcz5hi4YbuCIZv1fpfaI7ABtVkUKXxtfC6o+NhA42fGje9B/U7+p62hXHktn4tl+N38qXLYT7VDuf5AETn2Q/2vGUU5+00wyaLVecQEKRD9pGPXAvVJ5CdSDdrE8SdHndLJQUzzJLnIGqPv5IaDGN/lEeSG0cIboRQvcsCLig2+o2GjY1bExaCUxxCPxtBAb5MGf49F+lDu/rXRTPShbH+aB7RVGY5sfqFFTadbPJg= 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: List-Subscribe: List-Unsubscribe: From: "Mike Rapoport (Microsoft)" For SGI IP27 machines node_possible_map is statically set to NODE_MASK_ALL and it is not updated during NUMA initialization. Ensure that it only contains nodes present in the system. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron Acked-by: David Hildenbrand --- arch/mips/sgi-ip27/ip27-smp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c index 5d2652a1d35a..62733e049570 100644 --- a/arch/mips/sgi-ip27/ip27-smp.c +++ b/arch/mips/sgi-ip27/ip27-smp.c @@ -70,11 +70,13 @@ void cpu_node_probe(void) gda_t *gdap = GDA; nodes_clear(node_online_map); + nodes_clear(node_possible_map); for (i = 0; i < MAX_NUMNODES; i++) { nasid_t nasid = gdap->g_nasidtable[i]; if (nasid == INVALID_NASID) break; node_set_online(nasid); + node_set(nasid, node_possible_map); highest = node_scan_cpus(nasid, highest); }