From nobody Sat Oct 11 04:11:30 2025 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 26F9B222561 for ; Thu, 12 Jun 2025 08:28:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749716896; cv=none; b=sQdg4cVdypzKervAZPGpSln6OdmGWm6Jo7/vn2FFIu9Pz464PZ96ixqdnFAzoQVADjBm1BsQgX49PcEfYu0mJh3I+2UqbCyQ6UPGewfRsVstPoP8DOvBmlPxvimIB49z3tnWtNCw3NrsPGujqk0eDm/9p2KnI/jPoByW4NxUAdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749716896; c=relaxed/simple; bh=LvsURw/nqMWRXkm+nrhQDBaJHU6fMAmmLXpVcAQ1/T0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F1nq7OsVvy+fa1vEzk/111byQ2QeUZRr+rGJnl53w91S/LZw4LHKWpuJids5IXWXbOF+3k/TnzYJNEQ9kbINMUz36KatyTOpfWxWoHqlTUjNXXoOGkJncih6/2k9z+LvLPTRmAS6DEoP/UAWL04eZjqRCkcIIDymxxQ3yhI8a34= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=kyGJZhrQ; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="kyGJZhrQ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1749716893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q9di4IfgIfQZ0n6KWtQk6/b40WsXW7j7pcH/DrSfee4=; b=kyGJZhrQrniGsFhmlDOfmIcwdCwzLroPX7NLDuuw9E4yS0eeKDCnyyGZfNn9PYrekuCFCq UZZCsAgplLBiwIj72HQnDxKNlUU1MjQURJ3mXs+kkmafXVfkZg0c1SH5z6rehMyfDlXvPZ AsNgV51iAuoVo9aMfcbkRVmUgjuxiUM= From: Hao Ge To: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , Mike Rapoport , Richard Henderson , Matt Turner , Dennis Zhou , Tejun Heo , Christoph Lameter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Kent Overstreet Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-s390@vger.kernel.org, Hao Ge , Hao Ge Subject: [PATCH 3/5] s390: Modify the definition logic of WEAK_PER_CPU Date: Thu, 12 Jun 2025 16:27:28 +0800 Message-Id: <1baad81a8033eec2927f8a3ac6b792e930766724.1749715979.git.gehao@kylinos.cn> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Hao Ge As stated in the first patch of this patch series, we make ARCH_NEEDS_WEAK_PER_CPU a Kconfig option, and replace all instances of ARCH_NEEDS_WEAK_PER_CPU in the kernel code with MODULE_NEEDS_WEAK_PER_CPU, gated by #ifdef CONFIG_ARCH_NEEDS_WEAK_PER_CPU. We'll make corresponding changes for the s390 architecture. Suggested-by: Suren Baghdasaryan Signed-off-by: Hao Ge --- arch/s390/Kconfig | 1 + arch/s390/include/asm/percpu.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 0c16dc443e2f..716031d22346 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -132,6 +132,7 @@ config S390 select ARCH_INLINE_WRITE_UNLOCK_IRQ select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE + select ARCH_NEEDS_WEAK_PER_CPU select ARCH_STACKWALK select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_DEBUG_PAGEALLOC diff --git a/arch/s390/include/asm/percpu.h b/arch/s390/include/asm/percpu.h index 84f6b8357b45..a202baef86fb 100644 --- a/arch/s390/include/asm/percpu.h +++ b/arch/s390/include/asm/percpu.h @@ -17,8 +17,8 @@ * per cpu area, use weak definitions to force the compiler to * generate external references. */ -#if defined(MODULE) -#define ARCH_NEEDS_WEAK_PER_CPU +#if defined(MODULE) && defined(CONFIG_ARCH_NEEDS_WEAK_PER_CPU) +#define MODULE_NEEDS_WEAK_PER_CPU #endif =20 /* --=20 2.25.1