From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792738226; b=ubU7yq0pcCgv8JEnNYcOxmrBE5qkOh/ybEv9/jYs2tTn/fhwAi5TbB7twWHwHHtzX3b3 YROfml9IjOeDpY39nBdACur0JFlOum1kSlSEEbfFmLQSoZsDxlIv0EMW++XI1icwfHFK2 WVFuefbzKKn4cPQW1P6BQpUxJNhYhmuIJT1+U0vPhh1HEyYISMLo8gksgT2BwvtaOBX32 KmKkP6nbOKBPt50UIBFq5RRi6KBWBVMgQP9Ie1gfL+BFzl68cUnX8AF2xP0zCi7kcLZmm Dv+na5vQfVDNX0yPBPx3H+yKaS1uu5Zdm5J7S1udEig32g3rOrV+5BHKx9+8RkplMrg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792738226; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=zOPcyFbcw1UU/rJPmKSSRntH9qu/8Cc9l655f2GYy5w=; b=GjHxwXI+hC55fRkkx47mvecnUedI+5XwOusjhs9eSvElUxr8AzZOhIaiTALKYUBTOs8j MBjKTCt/c92IUJ3PM7HC+dkCUmZDXtDmgdJ5/XF4BNtWj27rjGJDY7JDJIdUFMcUzUpNr KqpPYh3x8Fr/MstHqlOCNi8iUD4uKV7+SYVveI1VAyWfdnoFmUH8lGCLZt0thINz5/PKw O2Vx7EuZHKQ9uKNK9r5PbeIIHTApRMw3frhVVy8AX2q/S+Bi4jphCyIGEw08MZ/PeOomh 4x6wqm3tI1bBtMIkGIpbifBB9b7/S4vFtgTNDT4Dkv0/3DpfNf5vYUeCef5ltiERpww== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OcodWPls; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09093606A338 for ; Fri, 23 Oct 2026 06:50:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 09093606A338 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OcodWPls DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792738225; 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=zOPcyFbcw1UU/rJPmKSSRntH9qu/8Cc9l655f2GYy5w=; b=OcodWPlsqQx9yxGrRaXNTz1vAWZpy9bL5guY76wiqy6o8TwGRH5s4BOGoyeIPIPi7v6yWg pHFgbH7aDLi/Sa6+B8PQJIt5gq0HzQnxPhratAoL9Wl2+Y4Yn4C0xMm2Cz1oCfJPF+/GgZ CpiqTcT2tWDrIlINvFmQLWH+9SlD87Q= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-EVBzjS2wMNS-cpFfn82bVA-1; Fri, 23 Oct 2026 02:50:18 -0400 X-MC-Unique: EVBzjS2wMNS-cpFfn82bVA-1 X-Mimecast-MFC-AGG-ID: EVBzjS2wMNS-cpFfn82bVA_1792738216 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9BACC195609D; Fri, 23 Oct 2026 06:50:16 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.48.42]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 332471956095; Fri, 23 Oct 2026 06:50:12 +0000 (UTC) From: Thomas Huth To: Arnd Bergmann , Nathan Chancellor , Nicolas Schier Cc: soc@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-arch@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v5 11/13] asm-generic: Replace __ASSEMBLY__ with __ASSEMBLER__ in non-uapi headers Date: Fri, 23 Oct 2026 08:48:48 +0200 Message-ID: <20261023064908.66707-12-thuth@redhat.com> In-Reply-To: <20261023064908.66707-1-thuth@redhat.com> References: <20261023064908.66707-1-thuth@redhat.com> X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 While the GCC and Clang compilers already define __ASSEMBLER__ auto- matically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. Let's standardize now on the __ASSEMBLER__ macro to avoid this confusion. Signed-off-by: Thomas Huth --- include/asm-generic/barrier.h | 4 ++-- include/asm-generic/bug.h | 4 ++-- include/asm-generic/current.h | 2 +- include/asm-generic/error-injection.h | 2 +- include/asm-generic/int-ll64.h | 6 +++--- include/asm-generic/rwonce.h | 4 ++-- include/asm-generic/signal.h | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h index b99cb57dfcccc..c029b1e1854c4 100644 --- a/include/asm-generic/barrier.h +++ b/include/asm-generic/barrier.h @@ -11,7 +11,7 @@ #ifndef __ASM_GENERIC_BARRIER_H #define __ASM_GENERIC_BARRIER_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include #include @@ -302,5 +302,5 @@ do { \ # define smp_mb__after_switch_mm() smp_mb() #endif -#endif /* !__ASSEMBLY__ */ +#endif /* !__ASSEMBLER__ */ #endif /* __ASM_GENERIC_BARRIER_H */ diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 09e8eccee8ed9..044ebc96f373c 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -26,7 +26,7 @@ #endif #endif /* WARN_CONDITION_STR */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include #include @@ -258,6 +258,6 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...); # define WARN_ON_SMP(x) ({0;}) #endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif diff --git a/include/asm-generic/current.h b/include/asm-generic/current.h index 9c2aeecbd05a6..8e7d8f019377f 100644 --- a/include/asm-generic/current.h +++ b/include/asm-generic/current.h @@ -2,7 +2,7 @@ #ifndef __ASM_GENERIC_CURRENT_H #define __ASM_GENERIC_CURRENT_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include #define get_current() (current_thread_info()->task) diff --git a/include/asm-generic/error-injection.h b/include/asm-generic/error-injection.h index b05253f68eaa5..0a9ec33fa8f20 100644 --- a/include/asm-generic/error-injection.h +++ b/include/asm-generic/error-injection.h @@ -2,7 +2,7 @@ #ifndef _ASM_GENERIC_ERROR_INJECTION_H #define _ASM_GENERIC_ERROR_INJECTION_H -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) +#if defined(__KERNEL__) && !defined(__ASSEMBLER__) enum { EI_ETYPE_NULL, /* Return NULL if failure */ EI_ETYPE_ERRNO, /* Return -ERRNO if failure */ diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h index a248545f1e18c..58974e8abbfae 100644 --- a/include/asm-generic/int-ll64.h +++ b/include/asm-generic/int-ll64.h @@ -11,7 +11,7 @@ #include -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ typedef __s8 s8; typedef __u8 u8; @@ -31,7 +31,7 @@ typedef __u64 u64; #define S64_C(x) x ## LL #define U64_C(x) x ## ULL -#else /* __ASSEMBLY__ */ +#else /* __ASSEMBLER__ */ #define S8_C(x) x #define U8_C(x) x @@ -42,6 +42,6 @@ typedef __u64 u64; #define S64_C(x) x #define U64_C(x) x -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_GENERIC_INT_LL64_H */ diff --git a/include/asm-generic/rwonce.h b/include/asm-generic/rwonce.h index 52b969c7cef93..c35b262ee4223 100644 --- a/include/asm-generic/rwonce.h +++ b/include/asm-generic/rwonce.h @@ -20,7 +20,7 @@ #ifndef __ASM_GENERIC_RWONCE_H #define __ASM_GENERIC_RWONCE_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include #include @@ -94,5 +94,5 @@ unsigned long read_word_at_a_time(const void *addr) return *(unsigned long *)addr; } -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* __ASM_GENERIC_RWONCE_H */ diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h index 663dd6d0795dc..392e59fd3d8b9 100644 --- a/include/asm-generic/signal.h +++ b/include/asm-generic/signal.h @@ -4,10 +4,10 @@ #include -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include #undef __HAVE_ARCH_SIG_BITOPS -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* _ASM_GENERIC_SIGNAL_H */ -- 2.56.0