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: 13720470 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 43359C30658 for ; Tue, 2 Jul 2024 23:40:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 82EC06B0085; Tue, 2 Jul 2024 19:40:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7DEDB6B008A; Tue, 2 Jul 2024 19:40:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 67F116B008C; Tue, 2 Jul 2024 19:40:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3BEEB6B0085 for ; Tue, 2 Jul 2024 19:40:48 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D80C1A0F29 for ; Tue, 2 Jul 2024 23:40:47 +0000 (UTC) X-FDA: 82296434934.20.1A44036 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by imf01.hostedemail.com (Postfix) with ESMTP id 3A22E40018 for ; Tue, 2 Jul 2024 23:40:46 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=QzQZo2Em; spf=pass (imf01.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719963635; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=cJEOaZsRPVbiGuudIWGWy1zvfHhkTSKgzDUwc10vK+0=; b=vojk+ANGHbflBYXEfKHG8BZa460Ht0LonTeqi/6ii78yIgBLx6skgY1KBqbG7EMyCD8I10 5g9bl8thfx4PZ2YMQaF6MLdw8SB5HjN/7rw1waSDUVJ1INd3nU4MfKg4gLDhWusYil0WVl EPgJAnBgSOHgSPdjGjRp3zd3rrKzVac= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=QzQZo2Em; spf=pass (imf01.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719963635; a=rsa-sha256; cv=none; b=DJFYKebebkFqqbCcLTvxiM6bgLqnz5KL8hxapBffVTp6fKhUwsnPyrzFf3cAekn6wZMQqD nnvr6d03DO6beU5PGgelKm72kA0RKX9Emb/T6iyHjx0SfZzYBszi8x0x6ERQv3b1tDzU37 EMf0gsIzOTlfScwkATKDuAcGFcaBO/U= Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-57cc1c00ba6so2928689a12.1 for ; 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=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cJEOaZsRPVbiGuudIWGWy1zvfHhkTSKgzDUwc10vK+0=; b=QzQZo2EmQzv+oAW1Xpk40W3GPStARORZJH2fJ8ACb9az00ZgalRB29bDuHnh5ByMr+ 0ccbj1msFDNsuztp2uD0LT8g0cDCEFT/xCSzZQwm4qwGC+ZHg6ElouqobLilLY11RK22 rzOGMC/hXNn1mgFF7fQM/STMRsp48531+1J+HfDb9KOQMFoYwPQxL/SUASy8iM7uAYzW Pe9W3P8bXrOxYBl7bctUFwigDZbdpIOj80NOdY6gICZJQ0gEHSVZR3HmSheMIQnGkZ+t bw5Nvc1ACYC0wqaag7rrIqWmrdvzol4Oo+aD4rolsKg0PEZl0Q8bJnNR9rCGW7d3Pmhd CICQ== 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=HPSVPx8Y42oySxGAw2SsQUshKHXz7AwC+7/I20yTCkM64tq89snmD5BXXSWK9NRjgj Ny1IkFADQlb7rvqcCC8s2ByrASF/6soQVD8sTgldhKB0SWWkrnATrBrzvxwr8BejocbN HPC+lqlAgaPP5q+dxdupPcX/eRYHYaeUiuGbPk4/5mA4fNFdKl7KhnQWbmWtyjULFM/k xCZctvsbO4ukYRN6bW8QHkxqHmYGESLTf91QFwlKKYnt/8bUoJpaR/vTZfd24mS10n+s N8Dz6c3qY0PjP3oXkNFJv3b/4Zm35UZrwLAOQvED3Y72f3htbjZzdvyw8bMdjpsaUUPs pBnQ== X-Gm-Message-State: AOJu0YzUj4cq21lDn10BOMzgBu+Up+p6kU0r6BLQnyfdBLl2rq5tUvQQ 62gDpunICXmtM/NpSmM1Zi6Bs6tJtvRkPoqmJ9OTt7mGQ2NEkb/2 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 X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 3A22E40018 X-Stat-Signature: gucggjgj9hijg19wpq5tqfemefm5tj58 X-HE-Tag: 1719963646-601862 X-HE-Meta: U2FsdGVkX1+RUW2BWTz6Xm3Jp2t5w1WM7ymmkgLTtPF9NUBXFh94w8yz2cyDaYez8TN9kRQGrWKBcNRgmJtpOAFYqbh/gIzeoncQjXxoI4ZlM7ffrElIcAmzLUBuQDmRK76dQcrnKBRrU0xcr4sDD5n/IWOur2ydl+tPwoVES7VYb+eM/wNQzJfN0oz3/uNZqLRhCG02TJ+Swvd3/i+FCoKS2XvZ5zIHSoQks4SOYzh20Lm0hBR3T1JI5BHhq+h720lrkpVuCEVoxUsHEOkIsVx5Qb/G2U1OL6RrYds+up9UJkx7yJCR3/4zcYLyD7xhdqVdlfXTIEI9qJLNzmIAzEq6ztGh40Or/Zsf6iJDHuV1+tqELEAzehAmbOWlcfyxh/OymmagsWJNlrPxJDzi+aZJ91CjllFMqQw5poKqXSbNs9TWqBx7Sv6SEY2V0z7alygmKuJqQ+jF6c+euKIxSeJN4D+iFdwXH3ovjzUesyNKiQ30w/YHOLqpVVD1YlqDVZfQKFGhEwwDId+uXRnA43reYVx5AdY4AfEoyXhtSnFn5Wyx+GgXoSoj9scTrt7yNmQXxX22idz/xdx+4uEsakdCLeM3pPRZox9qG0Uh5eKQj7OnXL1Bz4heaExfPgjGqvGv6y6K8CnnrLkoMxmG3XMdkne3zOcWomspt9f56FuX2DpL797CrqNCyWU2O6Xp4RcBjZ6M2FiCkdHWepU2PeqFg5js60uwIx29cJTva0JS27oFq9BjC9LQuFZIdeWDnjohdnPHa0CLAT8z0dE18Vc9f2oRJstTMVviZqu5NVG7Gv25j6v/VaVSTysd84XVEedV59u0OsLMS8mgYDGJ+C5O8XsX8dhbu3AKxOqIoIg3UPhvjcAfNa5G+3/CdPBW4pS4jUrTJTAlB+P/GXLnriB64tpQNJkXBhhJgL1FSF4FgINnNa5KQYLxFfNFnXTjZjNCNlDoLFbAHNkn6W/ 29WWZlsX utS7VzBrCjrO4VKN2SegII82Y+kaA6arkLPU1zvhT5rmEv1CT6WXEv2ffVSAY7cnHrDLsj4iP7R7YkOzqVJBUDy+7z+hmvRxmJLUaAWTJB5ZEaHFJKomw19vLvqBhV8qnpRWW0dGYGltrGzbuob4na5V6rtFGZfbsJE8edPycU3rgBGF1w/BFCYpwCotBf8L4H6TT2iJpz9nzfEveiJ72tUS6wey+CxOgZTBocP0cPXWSgRfx92gG5GQmXGuALy4QpO4BYhNhkkEAc95WCCiiRfWZ/PVED1vh4zbuPTi2ZvFa3lHQWz9J0030k/OWCgWDqjknIcVWQcY6ysJAuf2e9+ojSNEkwPGdG7tIanxwPfe01PgIZ+N6sXf8Qo2PgiXtysRD5ojE3xA9yGKGzH2K15W8sr79Bp7HpHLYR+KupXL6P/3VYyMV+EpwpJDG4hzaQFZYG65y08FvF6e+pCtAFJdGVA+lORJenOfUoLT355L12AwH1QNCWKkcs30I7frXXm+oY+LDxt35C5o= X-Bogosity: Ham, tests=bogofilter, spamicity=0.001361, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.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: 13720471 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 A65CEC30658 for ; Tue, 2 Jul 2024 23:40:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34ECB6B008C; Tue, 2 Jul 2024 19:40:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D7E16B0092; Tue, 2 Jul 2024 19:40:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 150E76B0093; Tue, 2 Jul 2024 19:40:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id EB71E6B008C for ; Tue, 2 Jul 2024 19:40:50 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6E5FE140152 for ; Tue, 2 Jul 2024 23:40:50 +0000 (UTC) X-FDA: 82296435060.15.9F000FB Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by imf12.hostedemail.com (Postfix) with ESMTP id A52F640010 for ; Tue, 2 Jul 2024 23:40:48 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=h4bXytXB; spf=pass (imf12.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719963617; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=flZpwFnHJZAIjKR4GYgW5NmzsJCUt0trCfVDgRJheOk=; b=XKrZU2Vy7PzgqBpzifQS8a629b19mKK+0GhwMc0QCdtgm31ffnkaucI56MZ3csccwu+JiU qRpuTK8Pc2KOgJ3PBTbQrQc19BNoCqgGRXy5OsDFdi+kx7iqvhu3OUvkTYtS0/aWSZ0rro LEjzVXvDCtWTtqjEYZ2gqOufDRPNgrw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=h4bXytXB; spf=pass (imf12.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.167.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719963617; a=rsa-sha256; cv=none; b=LueYuwm4EazZmzIUfKM7WfKH9LR2e4Rv3gy4NbwWJa/5ZhdHKrc49qN6xMR4dsym8ecDBS vJWiqyOETCOQWpzkUmc6YCzazAQhvH2P3vMESZ3+0VKBlwMs2OkJaNU88A28GOC+SsRyTJ meB6Zx9wvfeaOTnhvO4/vdDvfMTsFLk= Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5295e488248so6207111e87.2 for ; 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=kvack.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=h4bXytXBIhF4/IdqEs4OB1aWvxSnAJ92cLo13Xa2vcRsQpaSOdjANtSbASF7lVxttH 2keW7kWrKL4tGOTsAeB/xtFbgi/OD/s/C+QJi1VcgzyWr7iVk/Ek8Wm9I5hls57S3y54 d0R/mNtMoStxdGt47ZNJbsFrp3m6tGik6x/6RDONbTpi75syzxToAqI7ifhBkdPsECR5 LvWQ+4DR5bxgbxfyO0qg/AGr7D+8Y8ioivyIUiuomrbBs+9Otc97cqTpCAdIwgVwiadx 9YtOL7B6E4OfTIqRCEbOtaVclCe4K0fft6mz++PExuAnnDhyHoQUzc0pxPi4GkkqnuxR y52w== 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=uqFSKttGzjj/+KZUGdaaXIIkLqvPN8YyQjHLq/y9s2sP2av2PL7yqtjGtQM+cFouwz mQw3lW8XAf+YE1AeCT4HRPHIAccnUCwTdAUwQDiFKKfT1urVtSykZ1fi42D//Vhn5nT5 U82fFZiIGbxMazHMCX5qHa8rNKlaskXLDDQKvLhtuabsaOlcqIXCavhIyQr90A24vmMc 1YZqGfsZ6zpuf0Spfv8/mrO6ApCDlQTrZ+yuH3Otx+OK4RC2TbLrNl1B1b7ZYwsfTDOU yvxpyP/aaw/sPwAmHrI2yq9uYkMp1F0GMXl4JFb+FhHKaQwwGs5x8spvrHraRa09l1ix Jonw== X-Gm-Message-State: AOJu0YyQ+JXhu2GbzIaWCVlAxMFHM80l9UnubU6hmjqcr/Ky7KsFvXEu taUHppG/UgYxFshJCziNrWE67S5lVQHUblqiX04EJ8cnBfZWjywh 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> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A52F640010 X-Stat-Signature: bwoitxqzzk1nh1p9srjo5jzf1crpis89 X-Rspam-User: X-HE-Tag: 1719963648-664698 X-HE-Meta: U2FsdG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UGz7U3iqK2ad7rO4/I5BVBulpC/QSpG0VZAPGBs6QzAL2Vhc9MCIZ+wF88Wlr/zMSl7TEld4/Zr67LhdZgKgtAZxbZIzNuf+4zLOr/XstZ79WDzWxfeHwWO5Gr+qwfZukNF1l/CD0jHJmAvoSUu0/5reUkMtwrZP/lPZR0/qoD/nr3kMzXTI//rpu9IUDd46TbY9ciZ7fRdd0R8xeaTpKbObfa4L6c397o0kuX/FNa3Fe62F76VXyR5O9Mhmg9i+pSsu+76Ym9+0qJ/rZf+tSNOB+Po9HLoDyZxZi47Z3v79x74vldLaYe6pftMbcM+rTw+YCGLq7S3jt0+sNYXO/MWQRPCOAk9OKbr6Zq+JeFbafX64xpoYcOplaHeuY+zojo9t4yeQ6O1RVYEEsnzZmMNPy/jKB1qJAdMdCo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.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: 13720472 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 5AA23C31D97 for ; Tue, 2 Jul 2024 23:40:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DAEC56B0092; Tue, 2 Jul 2024 19:40:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D5D356B0093; Tue, 2 Jul 2024 19:40:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B628A6B0095; Tue, 2 Jul 2024 19:40:52 -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 924A56B0092 for ; Tue, 2 Jul 2024 19:40:52 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 247CF4023D for ; Tue, 2 Jul 2024 23:40:52 +0000 (UTC) X-FDA: 82296435144.11.14818A7 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by imf20.hostedemail.com (Postfix) with ESMTP id 71BFD1C000F for ; Tue, 2 Jul 2024 23:40:50 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=LHF+QvSM; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719963627; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references:dkim-signature; bh=jHXFaDKKpM4wPj0SsPzoA5iT48dNhq95fIw694vj4eI=; b=Hn0HWkyjOaLJ5Y5JO0nIXkwx4m+3aYjoD/mrsklSkYzef6Dks9KDX2m4gkFARb5JiU2BYV QVo4ql0lEOPrM1irMTEWm+w4Yjvn2G8ux+Qgrc0TFP0Qnh2F9dYFVAHMIPXcKXBRg8blcE 7i5wSx0SXyxauM2SGIVthSkPkZd72Qs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719963627; a=rsa-sha256; cv=none; b=D+suxCfgnZQDEg9OJPQRDd0BqIfKPkdCh5ikqjIymEDxNYO93HlAKnagZHmZcBW18Ur82j 2XCSXnEsS+A+c/vxjX4gCtetFT3ZAfhzl5zaruhk17WT42Mbc9MDNLdRJSY88jLD/Nt0sF lm4xF8tZM5XQgYb5wyWLxaKzY3KTGmo= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=LHF+QvSM; spf=pass (imf20.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a6265d3ba8fso494105066b.0 for ; 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=kvack.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=LHF+QvSMhDK60/ApZIhrZh1GURftuj+iF7NBj7drH3oOEjLnFQerC/q5mV5sMwoLfo WkIDrtK3viZ9ck7kP1laoF0g1TQ2NVHZoo/J+O6xmn84+SoiLQZBLgfZkP4PGbahfka7 9gqQ5jLyaYvnKb1ir38NLvcbuH+nwBY/uha5ZtCp4/ClUMnIAViqGFey98di2erOdBEZ AxlRrhgueFyYlMx+ElAZf271mVdl9G99QQ7o17Y//11DfKKPkStl0nyi7E4IraAkeFRT scyoa5u6nZYTgtejTeLUlmEzfMOByLZKLQ8APohw+qpR6yfxIZU6ffCTBv0b8wDAUEhP 7h8g== 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=wfnslaVK2Gne6HSBsT7vygzusnecx/a6fCu2A5n1BpffJyUEt+B9kIfchFDV5hYaav A8atCx7AaZ4cJYNOI1gVsKztjROkGpyRtniJP1RJIJbSAmXOXIyUJbyK5BK2RPOidNmn aCfHMPABnHzegelt1smQjs6MJtckr554/tR6ELn872QV3F6Yng0OI3ZmRQoZ4dmpPdPQ gimncyqLB52dsnYtsO0F3n0GSZd0BPyHYRJJ4gThvqeF+S9yO6c1wE4aEKheXX0z4bl8 SJI5yZCXhwKlFlQJ5P3aYFAyKuIgJ6eqm4SmOHNPC7f4l0KecDUzrSXeWM/vUPk9DO2f vYyw== X-Gm-Message-State: AOJu0YyCkxKIysUwi1URfjCHRNZlN0MxAOUIdKk9Dm+4O2CRkCRajcFW 5sWU2bOXUE6m3YuatY9oU2WWBzlV46WwTDW861S6nnr49aA04AHa 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> X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 71BFD1C000F X-Stat-Signature: 7em8kxeq54bqqj1qwu8bpjx57xd51yeo X-HE-Tag: 1719963650-593729 X-HE-Meta: U2FsdGVkX19Lj1iMR0sy6gPGkZyEUuqVRo6RNzYd9QjQie8pMfkuhpcAXJqa/t3OP6Tx0N2V+KzZJdWnqFr+6c7AFKk+CXwLFzaorojpL62dQrKh3uPgZsNde2E3bWJfhp5NGDsoi7IwDqjOQETaYKvKjUW0iT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JDqp/610yjUOAiStWhf10xErQdZMZW0z2KY1+9Mre/zq5nkos1DVf5F5IhSVz7H4rlb1L0K8AyJRMrIJQ5V/catsZrNp/JSfBVbIyjs8Timf4ayN1XSu0nBVoz5AIypqQmjFaX/j7ai6stS7jJpzO3umXEiTrIeogW1cUnD7PjOvETk1+BHYmQtuNwSIXvasVs8uEZ6Vs4Ahjlcx5c95dGpQESq6UdL0ouGumWnA2DJrr/bDmPxNoETj16iZp7yj5NA6PgvzylApMPDPNieSCCO92M6S4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000031, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.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;