From nobody Sat Oct 11 04:13:39 2025 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (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 BAD80223DFF for ; Thu, 12 Jun 2025 08:28:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749716890; cv=none; b=WxTN1Gd2cRCOX/ppGUFG7E6iWXXRKPxHMvvisWWy+EiXbGbMGrKWVxz64/W8JkilbvPJRvkQrwOBQlnKL2NIK64cvMm0DTELMsnfm4BYe/Dvol/K7z1DS1XzxyhCpKhqop0AN9J8EZUCng788eC46CNs08/qA88P6AFaWHMemHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749716890; c=relaxed/simple; bh=wa3NJsPEjZo2b/QKbicW0EiI4fSq+OLPcvk7PO4wrSQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aKmPWakYaOMGt5Ju5XqIf5hvOufK1LEW6isV1G+K/vopLxqgSmMoWt/IbDAIyORJkXTLKG4GQUvGMKWNwhwLslFnOSVkaK4fppG/jCsDEchsLM4Egjsr4EVy0r7E0NL4lPANXZV6iXzx+Kp64xopw3NTNx7ZudBdM7G/9zWq4P0= 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=lC689Via; arc=none smtp.client-ip=95.215.58.173 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="lC689Via" 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=1749716885; 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=1+SMqaJRr2gw7tiajb6Lxu2Z2z8tbEjCcRQA4pFVOF8=; b=lC689Viaz/2NV57fIl0BJ1lVZVPTi4rseVn5hKRgU9tieWXVdp4iqPcGcsbWmAFMS9wQK8 3feriPh5QlfbgT6OtRljSbkKI2MtbpLkU1WYvKdb/9nvHpz6olrwacdtPA3wZRdvvQxB1S evIAzeIU/aX82uOb2THJm4a/3/IAThU= 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 2/5] alpha: Modify the definition logic of WEAK_PER_CPU Date: Thu, 12 Jun 2025 16:27:27 +0800 Message-Id: <4d78498def57e0df4c768ad9eb672cac68fb51dc.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 alpha architecture. Suggested-by: Suren Baghdasaryan Signed-off-by: Hao Ge --- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/percpu.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 109a4cddcd13..ce9bc842e384 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -7,6 +7,7 @@ config ALPHA select ARCH_HAS_DMA_OPS if PCI select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_MIGHT_HAVE_PC_SERIO + select ARCH_NEEDS_WEAK_PER_CPU select ARCH_NO_PREEMPT select ARCH_NO_SG_CHAIN select ARCH_USE_CMPXCHG_LOCKREF diff --git a/arch/alpha/include/asm/percpu.h b/arch/alpha/include/asm/percp= u.h index 6923249f2d49..5d8b75ec3bf2 100644 --- a/arch/alpha/include/asm/percpu.h +++ b/arch/alpha/include/asm/percpu.h @@ -10,8 +10,8 @@ * * Always use weak definitions for percpu variables in modules. */ -#if defined(MODULE) && defined(CONFIG_SMP) -#define ARCH_NEEDS_WEAK_PER_CPU +#if defined(MODULE) && defined(CONFIG_SMP) && defined(CONFIG_ARCH_NEEDS_WE= AK_PER_CPU) +#define MODULE_NEEDS_WEAK_PER_CPU #endif =20 #include --=20 2.25.1