From patchwork Tue Jul 2 23:40:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13720474 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 37DFE15B0FA; Tue, 2 Jul 2024 23:40:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719963647; cv=none; b=H+3ZjtLwM0tLpO5sG22yBZY8/bjeezCYtYEPbuybRqNKyA4CodFjvOV0NtsF9WcUw1nxXGXrlwNuzPjBaifAgljmiIVU6Z9F1KK0xDKF7grpf68neAjFc1RTsnkT5PWnzBW7rXTc1GO86Y2YrWSRMe86SGyE2pk0TybjVyR5uWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719963647; c=relaxed/simple; bh=N+wq443NlUjcf3lRNRxhQH5p2CHjsuOd2xXb07QdHRk=; h=From:To:Cc:Subject:Date:Message-Id; b=R1MBW6eRV+R6rU6u8rSobZt8+CbgjyigV5UY3mky5ADrA6UsN7tCS5N1NDLSdbRSfmVbFX7a7xZPsEeSoP0xBO7Rnc7bOl+Nl9uJbvEfWT9Lf7Y75Bn+CbC8Raw1OjmtD0e/9xJ20StM4rhMOFU4WsKYR3y9mESju5/PpAmJ0Xc= 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=Sgje/WwI; arc=none smtp.client-ip=209.85.208.45 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Sgje/WwI" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-58b0beaf703so2286720a12.2; Tue, 02 Jul 2024 16:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719963644; x=1720568444; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cJEOaZsRPVbiGuudIWGWy1zvfHhkTSKgzDUwc10vK+0=; b=Sgje/WwIhyqX19FCjwF8AF8Yi43KUTwY4g2zjuHVWE66/CglYHMWP2E6aHoed51vn1 xyPcf/usV3+VczYU80UHE1zYhyG3/inrZUEbiWLjhRPlWlT6Hb3Ljpv/TsS5P6jPZ23a eMe/2usMcFCdQnw//AIdaA5yd4EhCT6J3oPxYHIFZr9akenfe8yGdq9YueYcaa60WExj ataemVbJiwjcg18e6PL5Er8KEsKF/eb6+k+m13nOOPX+vGnSjulJ1v6MKURODCCrugbS uZ9OlDSL1FNP0m9mqQZccSvaCniSTsQLBK6/ksCje5Vdq63gCgnhIsWk045uB154JCkP daCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719963644; x=1720568444; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cJEOaZsRPVbiGuudIWGWy1zvfHhkTSKgzDUwc10vK+0=; b=MQGD7W8wEFsRtBlbHMRhu/yUrxjBAttVwjGSbwXryAAjkZ5nvA3ebmvBKuxvLbJxRk oTlApJB5rwsme7ckxbvBC7FxagJIyQoeXYh0mKjxBi61HdFp2ChHkhVCKFzbrHnzOxIJ y4eH/fH4kldKp/dYcexBA3y8svhid6ewW4DrdX2j+jhl/4ahbvapnAOxD3h81KyF1cpg woy3T9bUd8bazLJ7KEwsZfclkuctUfgTKf8RG/jYX9KbISJnDfEdFYRme1kan5e7DxkP Vqv3W2fllPZ1Mka8jFani6lcKdRDXPH8UQlj7zuzeXo99JTWwOTqY+4aevk+AcASEYkh 9O2Q== X-Forwarded-Encrypted: i=1; AJvYcCUwbIwnB24fY/GS/a1G9RyUnH9cWrd8g2aogcLD0XLt7QDO7rkxM7YDAzHUKPV+qeZgEJthhpJhRU/kxZEUkCMb1p2+ve/jp0g6wYdFfL44s98VI+3+LoZDmESsEQg1mW5fGklinzlzuhRl X-Gm-Message-State: AOJu0YyrmghXQ14QSdLSWE6LL4yb4QK7NeV7VmsyxkfHcaTHjPSYkAHy 4B3nwtnxVo9AQPC62f7jGc6ad/IGavofYSIJvm06zy+STEZodHQ7bMPXrPWB X-Google-Smtp-Source: AGHT+IF/LZCrG2zoDAv3cjefO0IGr0QgiiQyn54Z8x+2P/A6Ygm8z4rCBAE4MqSe7gjXGbjq1US8rg== X-Received: by 2002:a05:6402:354c:b0:57c:9d54:67db with SMTP id 4fb4d7f45d1cf-5879f0cbdbfmr6803888a12.9.1719963644396; Tue, 02 Jul 2024 16:40:44 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58614d50580sm6287616a12.72.2024.07.02.16.40.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2024 16:40:42 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Wei Yang , Mike Rapoport Subject: [PATCH 1/3] mm: use zonelist_zone() to get zone Date: Tue, 2 Jul 2024 23:40:06 +0000 Message-Id: <20240702234008.19101-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Instead of accessing zoneref->zone directly, use zonelist_zone() like other places for consistency. No functional change. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) --- include/linux/mmzone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index cb7f265c2b96..a34a74f5b113 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1690,7 +1690,7 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, zone = zonelist_zone(z)) #define for_next_zone_zonelist_nodemask(zone, z, highidx, nodemask) \ - for (zone = z->zone; \ + for (zone = zonelist_zone(z); \ zone; \ z = next_zones_zonelist(++z, highidx, nodemask), \ zone = zonelist_zone(z)) From patchwork Tue Jul 2 23:40:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13720475 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 A305E17A5BD; Tue, 2 Jul 2024 23:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719963650; cv=none; b=dUE8K+GDLkFhn1OlcsXV+a8WabfAVlc9/K8NPLQtSxMw0OK+SR+Sp9Wi9EpSP3LXPwJF6I2uxZFmRuCJpKEQpV/ayL/6bCJxP+HF7bx94LMyBGa3Q0YUSiiQhegLwmswZWaj5fLghT6dR4w/xpWH8elN8k5Qe+oypl9Mx2bc+g0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719963650; c=relaxed/simple; bh=RSGpa93/BjrySJgA4hKzJdFLTDJjEWm8H0xldhPOJOU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=iWa/jmz2YA4ehxXegJ3LnIs14BYxze0g3ATttTuhjcbfuO0zpZJpRHNLeqNCFdz1IzhNVyGZl7lL5k/RS631WvVrRgKVbP6TZUZaM6GL7r/MQmgp7N7akYYcanu/1p7fws1hl+cakH+tATNu/grhx9PUmayfG0REhHIbzc2zDW8= 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=lmlWu7V6; arc=none smtp.client-ip=209.85.167.41 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lmlWu7V6" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-52cdfb69724so5872318e87.1; Tue, 02 Jul 2024 16:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719963647; x=1720568447; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=flZpwFnHJZAIjKR4GYgW5NmzsJCUt0trCfVDgRJheOk=; b=lmlWu7V6zvpD0TinqkRxGx/kXHMMJGUTHXR/aPs5WcRSdkhHKgxtFb8p4o3D+qMjVI UbTchTshTx+qSlg8aIeXyBgMqf/cBZ0hxhaVnJGnbaODR/ztl6AzTLsD5dfsPC++KOcY POZPauVCYle+iWQacpMVTBdphCPd3DJi8jvAVOm+CHB+OvG1EoC8L4cvKsDaZU/F3C7t X+sgF0AZ2eqQERPv3q5Z3L53WEG2bHyPFk5rOndwFNaaFwyoN/FnpoozwNgRC4C7iGD4 8bcvoRO6AxoCbOmeYuREdtvH7SBtjb7iPbLPEVVyw8mt976zqZ+iEI7Vk+XoWcnlQzLp ePXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719963647; x=1720568447; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=flZpwFnHJZAIjKR4GYgW5NmzsJCUt0trCfVDgRJheOk=; b=Pj7Bm/dYQz+xM2r4zxkliRgZF822ZA/cXR6HO/JVzK3kiBq9leyYpoDOzCdyOmeME1 mZ7YZzO26j3TLHyo4N4O3kMcTkLne90oIKpJ73Gq2ONR7dwZUxvOA4BApuaPvtOiUQ4S 5Bmml+0dZWoRrZsFBT6RN0o/yNZbhACy2+YBkT7wZcjCZ32gwlMAJO0mmkOiOHB+ybVh bGkIoxZXI3XpiO+Ojp/XS2unhfADQtcxWr7mAUIuqmLLsfSwj5+i670vKhIsA5FD2qy+ idD07j31DldKI5I1J2MpqNCa497VZpvx2QZog92qauEhXOQqR6O4qNX7EAlI/lkGD8Ul yzLQ== X-Forwarded-Encrypted: i=1; AJvYcCWaDEAKkcdS8PjRKDEDepf7+mYFYZzPr2wdmU7XukRCCHtu+s/wO84JUCMhnfIssmNHvMvyxNWZrHbokgILN80xY4DJ+uMQRHGBRg2aFr2nZwXeX3eXmRuhGbCVk3X3b3JqpvnggIxQeTRN X-Gm-Message-State: AOJu0YzXhC9/4DsDswqwLN4S0s942vm56Qu5p2bg0wfgvqGQ+vVQEm6E BvHIXgGpZNdLnbExzbbax0t9IcvnJvuWBkoL+dy14BOVIeVxO4jM X-Google-Smtp-Source: AGHT+IHd4OQHXmJkAD63CJiXsjXmuuT6X8jxrvRfP6/EEesBplsWLHPtSNkPNKSFD2Ms3CdfX+HeUw== X-Received: by 2002:a05:6512:e9a:b0:52c:7f7f:dc1f with SMTP id 2adb3069b0e04-52e82744244mr6426928e87.61.1719963646474; Tue, 02 Jul 2024 16:40:46 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7478d33ee7sm364675466b.143.2024.07.02.16.40.44 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2024 16:40:44 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Wei Yang , Mike Rapoport Subject: [PATCH 2/3] modpost: .meminit.* is not in init section when CONFIG_MEMORY_HOTPLUG set Date: Tue, 2 Jul 2024 23:40:07 +0000 Message-Id: <20240702234008.19101-2-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240702234008.19101-1-richard.weiyang@gmail.com> References: <20240702234008.19101-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: .meminit.* is not put into init section when CONFIG_MEMORY_HOTPLUG is set, since we define MEM_KEEP()/MEM_DISCARD() according to CONFIG_MEMORY_HOTPLUG. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) --- scripts/mod/modpost.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f48d72d22dc2..81134403d4d7 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -22,6 +22,7 @@ #include #include "modpost.h" #include "../../include/linux/license.h" +#include "../../include/generated/autoconf.h" static bool module_enabled; /* Are we using CONFIG_MODVERSIONS? */ @@ -775,9 +776,14 @@ static void check_section(const char *modname, struct elf_info *elf, +#if defined(CONFIG_MEMORY_HOTPLUG) +#define ALL_INIT_DATA_SECTIONS \ + ".init.setup", ".init.rodata", ".init.data" +#else #define ALL_INIT_DATA_SECTIONS \ ".init.setup", ".init.rodata", ".meminit.rodata", \ ".init.data", ".meminit.data" +#endif #define ALL_PCI_INIT_SECTIONS \ ".pci_fixup_early", ".pci_fixup_header", ".pci_fixup_final", \ @@ -786,7 +792,11 @@ static void check_section(const char *modname, struct elf_info *elf, #define ALL_XXXINIT_SECTIONS ".meminit.*" +#if defined(CONFIG_MEMORY_HOTPLUG) +#define ALL_INIT_SECTIONS INIT_SECTIONS +#else #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS +#endif #define ALL_EXIT_SECTIONS ".exit.*" #define DATA_SECTIONS ".data", ".data.rel" From patchwork Tue Jul 2 23:40:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13720476 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 A0CE617DA07; Tue, 2 Jul 2024 23:40:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719963652; cv=none; b=qMIxeecdSZjPF52tF7byHLL2wHHg01uVv664MLOvpyesSAXAcSk7vWnMLsLgMSmTtItBPkfeaZlC5tFrCyoYv1YGrjCiOl13LV6fLJrLXqAtiIHjYSKaYYWEyAYGZ++ClW5QWVnTpohCwC8oFV/aaOgjFB39ZCLw/GbNkOcAVkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719963652; c=relaxed/simple; bh=7kZY2KUAG8fJVOu0GscVDQewTt7BAp7yeB7aJnElh24=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Cn7ouLEpeO9/LeChf+ohjaMm7rsKjz/n9nAlp2kG2SNUvBWm7lkKJ+rZSQEA58PpHtLD/2vPaGGdu/6GO/PnTtps2g2X/uu3VxaAJa0wUzD5+lKQRsOPdkDQfe0JuOzRLLgq5AMySUEi/mX5YkWFeQxmLjWHfmPjp8PHz57C2mI= 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=Uv0GA63a; arc=none smtp.client-ip=209.85.218.50 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uv0GA63a" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a7523f0870cso356540166b.3; Tue, 02 Jul 2024 16:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719963649; x=1720568449; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=jHXFaDKKpM4wPj0SsPzoA5iT48dNhq95fIw694vj4eI=; b=Uv0GA63a+x1VGdmhr7aESl4+qRUiHWtH+g/Z2d+DGFjvmWXJ5HUb68X4xLEbyNa5MI ng/zEIaGQFZ3Cgx0ovDxm+s2CT0l32nQmYMM9WzTjSIeVJ51bmr1KghVqPa5ZPUO5KkN kOFn7h1Ef3jTpwtELiOQ3H3UJRpZcan8cfEK9IiSCJGywf/Vs/UBD6+BK/O0bgHfCEs/ Fl7FNHeurfRTTWpfGAG3wzb9//yXredtKqwiFpxo9g3WX24EmjAXsDalLT7wn0wCXfoD R7nNsUnEKZqswtmjN4w1EByFwjH/48dq2+uuchZm3guJYlOhI2ohdIwRfKto+B+s3bsM 039w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719963649; x=1720568449; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jHXFaDKKpM4wPj0SsPzoA5iT48dNhq95fIw694vj4eI=; b=LLqfa6xv3RjejImwKlJ+mX8jssox4FyoinQtCIfVfah3hqUGjlKCfq2YA3/KaFY+T3 +ZxnkeM5n3/ktFVICP3N8L2gTXm+fDfX+OYrvQ8sNm5wns+bMaJpePSUManFB57dXbW3 6SZx7zuZWE+4PSmOp3Ztel0pt1p10pkx8Th+BFdiOintOzct08MBf39Jw632Qcyddjsl Oz4QUxZmN4C0ht0XSsTg6czHnCqmCkaVU256O+XMHvOVT/mQ7f5QjHbdzGnNNzZw9aZh cygXsfQMAd31+a0ZqPAia1WIi4qaN3vKmiK5Zb3BlOhAE5EotsibCVIVHrNSr7f8Oxfe 700w== X-Forwarded-Encrypted: i=1; AJvYcCUeVVp3vHUeO9yrncDMRAwO6f5viduE9NBOdV+DY6HZU65QVsoEA48YJaOQ6/tdwEPGLvKG74kQ4PRa6x13rJ3LKgz8Qiw9Q/b+jVBfxNsFK84ypvMF6DQDnww0iluDqWbVoca+fueqDyDX X-Gm-Message-State: AOJu0YxXr848qPxguBdajIdxcqptnJo9JzlkEvXU+U5JVIZTtBX3MKcQ 585bWhMAw1kuVwtP0iyUE33ev1lZ9BTy9sBrRKnuz9ZvG0e6fdRGyzV1TMXa X-Google-Smtp-Source: AGHT+IHRcFART3FMaK+lcYezZZDGikjxHPokwTlNpfHogv3kaOgAi/zLeAumptvDqvHEJD8cdJPrYQ== X-Received: by 2002:a17:906:a28e:b0:a6f:55e8:b361 with SMTP id a640c23a62f3a-a7514423236mr519869166b.41.1719963648601; Tue, 02 Jul 2024 16:40:48 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72ab08cfccsm459701666b.148.2024.07.02.16.40.46 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2024 16:40:47 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org, masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Wei Yang , Mike Rapoport Subject: [PATCH 3/3] mm/page_alloc: put __free_pages_core() in __meminit section Date: Tue, 2 Jul 2024 23:40:08 +0000 Message-Id: <20240702234008.19101-3-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20240702234008.19101-1-richard.weiyang@gmail.com> References: <20240702234008.19101-1-richard.weiyang@gmail.com> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Function __free_pages_core() is only used in bootmem init and hot-add memory init path. Let's put it in __meminit section. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 480e4416131f..c46aedfc9a12 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1219,7 +1219,7 @@ static void __free_pages_ok(struct page *page, unsigned int order, __count_vm_events(PGFREE, 1 << order); } -void __free_pages_core(struct page *page, unsigned int order, +void __meminit __free_pages_core(struct page *page, unsigned int order, enum meminit_context context) { unsigned int nr_pages = 1 << order;