From patchwork Tue Mar 21 08:30:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13182364 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 35038C74A5B for ; Tue, 21 Mar 2023 08:31:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A1BE66B0075; Tue, 21 Mar 2023 04:31:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CABB6B0078; Tue, 21 Mar 2023 04:31:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E1466B007B; Tue, 21 Mar 2023 04:31:12 -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 4D7776B0075 for ; Tue, 21 Mar 2023 04:31:12 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 269DEC157E for ; Tue, 21 Mar 2023 08:31:12 +0000 (UTC) X-FDA: 80592235584.29.E1B2A1B Received: from michel.telenet-ops.be (michel.telenet-ops.be [195.130.137.88]) by imf17.hostedemail.com (Postfix) with ESMTP id 4308240019 for ; Tue, 21 Mar 2023 08:31:10 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=none; spf=none (imf17.hostedemail.com: domain of geert@linux-m68k.org has no SPF policy when checking 195.130.137.88) smtp.mailfrom=geert@linux-m68k.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679387470; 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: references; bh=JU2KGO7hMIMmKn7/4GppMdGXO2OELXN8RzbIXO4KOGY=; b=f9uDUjOxxJGD72pHmds2lS3sOZHEWNZQtjSmWDUYRSttRzHWUCCsNq2Gt+Dt2ZXUdCGZxQ FkvP6W/edME1ui31asWZC2lqfkQvqcLUhAL0uAAMtYaCndNlJ9KSj10wOOwHzsHQ8pCgzG Mqs0L1OfWq1gO3dQG4tMDJfBDSu38Wo= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=none; spf=none (imf17.hostedemail.com: domain of geert@linux-m68k.org has no SPF policy when checking 195.130.137.88) smtp.mailfrom=geert@linux-m68k.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679387470; a=rsa-sha256; cv=none; b=S0MdkvLFoFwdqjbpmUDO4hwXcWccoSpfgT6d60k+DRf+2kR0BAc8Pzwl7ze6R+KkKu4w03 Rt9YX60hDBIYZdaR8LKjeho+DtR0ClJxCYhTPyJMj18A4zzhnGSEM2E5Zeq6ZJ7/i504b2 ISpEzvMr2B9fZPw0eZSMddqBiRzfCeI= Received: from ramsan.of.borg ([84.195.187.55]) by michel.telenet-ops.be with bizsmtp id awX12900E1C8whw06wX1Zd; Tue, 21 Mar 2023 09:31:08 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1peXNr-00E6VQ-Gp; Tue, 21 Mar 2023 09:31:01 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1peXOX-007g6A-62; Tue, 21 Mar 2023 09:31:01 +0100 From: Geert Uytterhoeven To: Dave Hansen , Arnd Bergmann , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: John Paul Adrian Glaubitz , linux-mm@kvack.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Randy Dunlap Subject: [PATCH] mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP Date: Tue, 21 Mar 2023 09:30:59 +0100 Message-Id: <67261c513706241d479b8b4cf46eb4e6fb0417ba.1679387262.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4308240019 X-Stat-Signature: szqkx5u54n9ksya5dkio4pxmeek9ix4w X-HE-Tag: 1679387470-173649 X-HE-Meta: U2FsdGVkX1+iCbpTuOqWaujuYVRdgcFJ8JYW1fJ2XQOD2aNT0/SgEjH7uHMIZHSg+tOPHZFLZL+6ZMzNcU1uSpVsjY8Ssgxw/IBW3lQlxt33P996KEFI90AQXFTYVAL76Yc4DCmgfmwfc8Q7CcJTDPLKMU8tV2uouneDpzG8SjYo8SFd9RPJbUPpihHI0ndylm6aTC0eiYSCnbERK4YzShkDxhn5XyQVUQHg3vNekiry5lwzGS9oYO3XZIcxKcp/p2qAcLtRIp/NCDgncR+UhUnVp1ofUbH75ijBhOp9lhrqY+xl+3f74lHX8ANRL5V3ppWqjtoeVkSoSp1R0OTaNiSbveosDJ7M5hzYdtkj3p4bWC/xwKoePxo2kr4RdTK4ZFJEZJf/FosYywiRX4zn2V4ZZJCZUOhz4cTFOGZlhyoVId1v/s30WQ4b+i8uR2WdmmfQwhQz2iWJ/aGHjBksdy8qYPN+qLY8/Ue2la+mFOBK57yoMmluCubxcUfDbXCaa+KrPmTG1Cg9T1N7cE9SpLL0dmobOZ/HwX/Uxkc/U3hydhNiY4e8Y5DGX3NT+6ZyiZPbRyxOGIEvAxkIXarQQaoazBx2eYUe5YdXOk45S/SvpBoUJBmtLU+lhZVRQJZgCG0/NdW6VYdfbeEAkseAjogsuYK3q3fq/vjzrJfUpV2tHrErDO4mcCPrPJi06Fafi2s3wUngFFP+jpqdAuDjX+/HVyfXlPuhC+rH9bT0VfUfbMbxCFGL/ZWx8BA0JiLU3jGB7J48CAFLfvTKdLeslsvrT/0fPSVRI8QHZUQrYmBEFfL7q8TOhbixvxJyUI3pdi6N4TshnhnCATz90IxRa1pW3cjQd9cZhfsNkOyd6dcd/GekK0yDbQeF7Qc/YuMJqnoLdSLYYFUjZlyrKhAB7wPfMHk8qR3DFpegY1vDrZ5Hto+qJ8Ztzo1w/hM1SlThW6pxiG5VfkzmZoFXc4v zx95Flrz tPyQqcRd6elWJdUYG7zVdvUkOq3U77qgtsgDw6rnEM/MaP/mv3AU2lpI1NZQG+JWDHQ+iEJtFRkFVrsjM7X7A1gYbeFpdbMs/QbuhAJ7UhMEAlnEPCsG6Oobt7Yzz67c/3pNjCNpT8vCrVa0ZcCSB4iC6yMtzCCtTStKncdNvchOfFMFNVYEoF0+3rdtp9ZwtHcumG4iBYROsKJTAEdfwESEROXLaxxN01xT/UJUMKJpaNyIZ2UooMNAC1OkSPu1W6bjHh2ya4YoibC4e1pYJC7pYbmcfgrq3mFFRti/29Jj97EmI85VdksQ5zevUSMpBarGmmukOXi05QUELrHbvfnp43Yj9FMIUyKMZJ6uCXMAmfEun2MvpHJlfqDx/Fgl+6GcnKS5xWb1JKI6LpoGeg7uZYyTbZBK0jLqObX3gWrAbTfwtKn6MJANhqrhOd9gMdg1VS8xZsXycRG1xSBtGnMV7c+ASnkmR/3ouQBQBlbQLcfIaGhbapQb/cQGxwHXPflVdTLPnVVMvGabQUQwnU4SBwh+ykweKjWsSw30Z+fd5HgXkjmlCgFpFmmktbkzUngYjUOVmL1ElUqM1rTsHp/aaSfihKbWka/TOIzCu5YV1c4k= 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: sh/migor_defconfig: mm/slab.c: In function ‘slab_memory_callback’: mm/slab.c:1127:23: error: implicit declaration of function ‘init_cache_node_node’; did you mean ‘drain_cache_node_node’? [-Werror=implicit-function-declaration] 1127 | ret = init_cache_node_node(nid); | ^~~~~~~~~~~~~~~~~~~~ | drain_cache_node_node The #ifdef condition protecting the definition of init_cache_node_node() no longer matches the conditions protecting the (multiple) users. Fix this by syncing the conditions. Fixes: 76af6a054da40553 ("mm/migrate: add CPU hotplug to demotion #ifdef") Reported-by: Randy Dunlap Link: https://lore.kernel.org/r/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Acked-by: Randy Dunlap --- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slab.c b/mm/slab.c index ba454246ee13dd4d..de1523a78f2e7367 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -839,7 +839,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp) return 0; } -#if (defined(CONFIG_NUMA) && defined(CONFIG_MEMORY_HOTPLUG)) || defined(CONFIG_SMP) +#if defined(CONFIG_NUMA) || defined(CONFIG_SMP) /* * Allocates and initializes node for a node on each slab cache, used for * either memory or cpu hotplug. If memory is being hot-added, the kmem_cache_node