Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2532715lqp; Mon, 25 Mar 2024 01:25:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXYLUm2LwZCD0ybqTWFP27zDSn0/asuIJG/7aWTKmojNXTSTAXLeru3LEqfKkpuYjlV9n3ftD3Ncx18Bgz9+2XIydkoT4/ZexQ36p0NRg== X-Google-Smtp-Source: AGHT+IGGdESsCDqPswlwD39M0YIfTM+6ozgfLxpj1AFucsKbH17Wi+qVY9XR832XBSPoIfD7gTtm X-Received: by 2002:a05:620a:1991:b0:78a:575b:ecb3 with SMTP id bm17-20020a05620a199100b0078a575becb3mr2567680qkb.78.1711355135831; Mon, 25 Mar 2024 01:25:35 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u8-20020a05620a120800b0078802f0ba65si4886848qkj.376.2024.03.25.01.25.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:25:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116074-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=F+0mZF4T; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-116074-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116074-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8914A1C2F881 for ; Mon, 25 Mar 2024 08:25:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3769328A5B7; Mon, 25 Mar 2024 03:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F+0mZF4T" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B91427A856; Sun, 24 Mar 2024 23:38:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323498; cv=none; b=aRU5rfVjDMOs34ojik+PSM3wm19Y6/cYyWN3AvuUZOt8Lvjcq/4vGuaEGJ27kUCr/yv53jlh03NqXYuXauNb72coJkFCz0fIPCiDaRGnpaCYAv5vqJ3wSSt6AkKikyzV3MnJExHX6Pd2anAGIC83egnEjAi1joZIukNHUKSP1Jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323498; c=relaxed/simple; bh=+PUu5RM10hKszLtQ9PhN2GrdWiBPvEkFSKTRdD/60jc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hxXRv1fa9iapw77vXpFAH5DrV1vT24NAodZy2EmDJS51Pi5nBR+Tg16Hk/8xNBWlh8EVEwTp9L/oiYQ4t+ZbVlUCnV2Uu+e4T9VHk/nTf5VkkeHKWVLbT+0SwiyiQK8dYn9qQ59Rz3Nm0c97pBYUqNmhv/1WUFKatku6w+KWX1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F+0mZF4T; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 540A7C43394; Sun, 24 Mar 2024 23:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323498; bh=+PUu5RM10hKszLtQ9PhN2GrdWiBPvEkFSKTRdD/60jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+0mZF4Tc01QHgr51r7YPRUyBowSH2Pr01P25EByXtrMx/hD/vLTfnoh8UEavEChU LJ+NAwhLqlbGixAO/BEfaKHwwhrf/YbeqA1SIrcPf79qqzvVbi7ey+JAsFbXwY3wxZ Eozsp7gaFMJoBOk97T36LhhuuQjNkWgBI+HMt5ewHIpx1PB8PCetJgGF8MWDa9JlNs QK/2YWIpjsgq9NCuQEzraEFL98FtYEbnB3lo6+wcig5O2EOQQoDlgdDwi0kgrYYnID VP8QTEJZi6mCVsYR7sMv4YZnTD+noDRLk+4QQsHD/EniqO3DakU75KwoF56K9vFbt6 XjKRdf46Oi1Pw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe Leroy , kernel test robot , Michael Ellerman , Sasha Levin Subject: [PATCH 5.15 203/317] powerpc: Force inlining of arch_vmap_p{u/m}d_supported() Date: Sun, 24 Mar 2024 19:33:03 -0400 Message-ID: <20240324233458.1352854-204-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324233458.1352854-1-sashal@kernel.org> References: <20240324233458.1352854-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Christophe Leroy [ Upstream commit c5aebb53b32460bc52680dd4e2a2f6b84d5ea521 ] arch_vmap_pud_supported() and arch_vmap_pmd_supported() are expected to constant-fold to false when RADIX is not enabled. Force inlining in order to avoid following failure which leads to unexpected call of non-existing pud_set_huge() and pmd_set_huge() on powerpc 8xx. In function 'pud_huge_tests', inlined from 'debug_vm_pgtable' at mm/debug_vm_pgtable.c:1399:2: /arch/powerpc/include/asm/vmalloc.h:9:33: warning: inlining failed in call to 'arch_vmap_pud_supported.isra': call is unlikely and code size would grow [-Winline] 9 | #define arch_vmap_pud_supported arch_vmap_pud_supported | ^~~~~~~~~~~~~~~~~~~~~~~ /arch/powerpc/include/asm/vmalloc.h:10:20: note: in expansion of macro 'arch_vmap_pud_supported' 10 | static inline bool arch_vmap_pud_supported(pgprot_t prot) | ^~~~~~~~~~~~~~~~~~~~~~~ /arch/powerpc/include/asm/vmalloc.h:9:33: note: called from here 9 | #define arch_vmap_pud_supported arch_vmap_pud_supported mm/debug_vm_pgtable.c:458:14: note: in expansion of macro 'arch_vmap_pud_supported' 458 | if (!arch_vmap_pud_supported(args->page_prot) || | ^~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402131836.OU1TDuoi-lkp@intel.com/ Fixes: 8309c9d71702 ("powerpc: inline huge vmap supported functions") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/bbd84ad52bf377e8d3b5865a906f2dc5d99964ba.1707832677.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/vmalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/vmalloc.h b/arch/powerpc/include/asm/vmalloc.h index 4c69ece52a31e..59ed89890c902 100644 --- a/arch/powerpc/include/asm/vmalloc.h +++ b/arch/powerpc/include/asm/vmalloc.h @@ -7,14 +7,14 @@ #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP #define arch_vmap_pud_supported arch_vmap_pud_supported -static inline bool arch_vmap_pud_supported(pgprot_t prot) +static __always_inline bool arch_vmap_pud_supported(pgprot_t prot) { /* HPT does not cope with large pages in the vmalloc area */ return radix_enabled(); } #define arch_vmap_pmd_supported arch_vmap_pmd_supported -static inline bool arch_vmap_pmd_supported(pgprot_t prot) +static __always_inline bool arch_vmap_pmd_supported(pgprot_t prot) { return radix_enabled(); } -- 2.43.0