From patchwork Wed Jun 5 11:40:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13686707 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 D6D19C27C5E for ; Wed, 5 Jun 2024 11:41:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 68BBF6B00A0; Wed, 5 Jun 2024 07:41:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C6DF6B00A1; Wed, 5 Jun 2024 07:41:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 466906B00A2; Wed, 5 Jun 2024 07:41:56 -0400 (EDT) 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 1EC626B00A0 for ; Wed, 5 Jun 2024 07:41:56 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CA10640A56 for ; Wed, 5 Jun 2024 11:41:55 +0000 (UTC) X-FDA: 82196645790.21.EE45DFC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 230984000D for ; Wed, 5 Jun 2024 11:41:53 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nB+tpFCK; spf=pass (imf07.hostedemail.com: domain of bjorn@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=bjorn@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=1717587714; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WkxblJ1gobgM+JXKqAse9j+xJDQ9TiFZ7lAYSIVKF8o=; b=io2YdhbZTub2jv/n7rjEasU+VSK9N3Q81c9eCJFKBNC5Q6K5jLRdDka8azWtJnl7i/d5Pi rG6AepXIU83d9edNmdma9w3rWe1myfPwy5V97dc96Rw+5Cb9HAiO2I6qZ6nGA/Bbh0zbC1 CUh2eVp8gmvPA+08jOaQn5PLYDeVA/8= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nB+tpFCK; spf=pass (imf07.hostedemail.com: domain of bjorn@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=bjorn@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717587714; a=rsa-sha256; cv=none; b=Vz1h9wlENrOQrtBy3YdiXeolCeQjnUqXzPTiHfR9Qf7Zthes7xUcY+F5Ydr/JDZupMNS9v 2Z/4mUrBFUoz+EK9YKlrns2B6FiUgXVWqpkybB0E8Ao5xLUEcdahV/QACmAuxwiqaxHbO1 RO7HaoPNFuAvGC9Q8Wf2R3h1an3syO8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5040A61828; Wed, 5 Jun 2024 11:41:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB9B2C4AF09; Wed, 5 Jun 2024 11:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717587713; bh=L6J14KqpfXLFzLpqo0wTWwklGSKZlK82ek5ghR0epQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nB+tpFCKWoin2Io1tYNh/CpS+b2KOE96Igf2M+PajeAiqjcAwFpQdkIQ1roxi2gFS ybrJ6R3VNsPGfwYETuovRb8MmTUuzJYXMZkdk5PkklSmzl/mvUssCtdc8sq6Nn+608 Msnb1PAycmOOBfXZz9FDQCndMLunP+YGOi1F1+qIlP3WKOUwv5u+jFCiovPNw7bR/f mDZYBsTyIzCYUGva5g5QSNHBpM7IOMr7msMbj2JmcxdV3QiHfU6VxtsKG0bPV/tDWi hYQBxxJxkhebALDI+e5GZRgBFT6W8RxUwONIgOVjjb2cDwx5omNGuOKTPYICI4q2OY 63QpUaPxQzQfw== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: Alexandre Ghiti , Albert Ou , David Hildenbrand , Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, Oscar Salvador Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Andrew Bresticker , Chethan Seshadri , Lorenzo Stoakes , Santosh Mamila , Sivakumar Munnangi , Sunil V L , linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org Subject: [PATCH v4 08/11] riscv: Enable memory hotplugging for RISC-V Date: Wed, 5 Jun 2024 13:40:51 +0200 Message-ID: <20240605114100.315918-9-bjorn@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240605114100.315918-1-bjorn@kernel.org> References: <20240605114100.315918-1-bjorn@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 230984000D X-Stat-Signature: zghpdshyxzpjjjwbtup1q1bj5bd6n4ee X-Rspam-User: X-HE-Tag: 1717587713-480632 X-HE-Meta: U2FsdGVkX1+kzZMNPx2RJ+ni7GrHiA8GuXVEJp0mwJNwG/jXRKx8dGcl3s65VNg2dZHBZquviM/QzQZuN8+bYzSzsMpT3oVgj5tZ+vWQFM4PE2Xg/8epDSR7dD8vWv0e9nKQr8bC+2M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Biu0FBAaK2KEEPHcYAR5CRPftheAZg6K8RVNLHW2qKM9kb+nEt2m8nLepHT6RiKqrag3Ii/4idbx2AxS/QMVPPcR0X3HVw67F0gDCV3Xt42KJ0ZDgjRcc4EY8g12W 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: Björn Töpel Enable ARCH_ENABLE_MEMORY_HOTPLUG and ARCH_ENABLE_MEMORY_HOTREMOVE for RISC-V. Reviewed-by: Alexandre Ghiti Signed-off-by: Björn Töpel --- arch/riscv/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 0525ee2d63c7..8d860ad3b171 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -16,6 +16,8 @@ config RISCV select ACPI_REDUCED_HARDWARE_ONLY if ACPI select ARCH_DMA_DEFAULT_COHERENT select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION + select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM_VMEMMAP + select ARCH_ENABLE_MEMORY_HOTREMOVE if MEMORY_HOTPLUG select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE select ARCH_HAS_BINFMT_FLAT @@ -46,6 +48,7 @@ config RISCV select ARCH_HAS_UBSAN select ARCH_HAS_VDSO_DATA select ARCH_KEEP_MEMBLOCK if ACPI + select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE if 64BIT && MMU select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT select ARCH_STACKWALK