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=1792738223; b=M8TyFQ7ItsCZI+TW2/1t210CqCCMU5PTm+reXkz7Hyu0tc/leKJh0AoLGqO37B0T/Ai/ kpPheOmCmPO+aNWab/ygAy0WsJxRdeLHWSIeulFTC0+0eG7ZLevhVsJtALr7KmgJMvVc7 JxdFXyy2oYSLW9HLmxjm0ptqIQn6zyP/omDPd4OfC/Da25SqyWWpjZCl2oM+2fhg7/xEp S5NgMHyEIxKkKnvZP4DWLB0kqDZI7nxUXgcV2WT8/6E6XLL6MBNoR7Q3mcQkj5ZczMb5A 65bL9mmZeH/ThUwq6+pxKT9zelOd7B/s0sj7/IAzgAABt/DsilU8gwAPPVO1MAhMPBg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792738223; 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=30lbsVA3o45JeGhZ4eANOoIVGbOuilpWX1PzZchNXMqQrIxKaZwR6J5mPwYGYXt4Npn2 kje5ATnhGu+4vMFxEIIAH6GHVfGacy4glK067kMcBrHRQMyGyF15HLLMvd86SgD5bTGqu 7qpW+zR3ZPaFbUO3rJOmBFYgHbqVgVmtgfz6ITw8P1je40w9OKiNSAGdjLt1RzwEtaNru R+0z+7E4e9twI2BQ0Krqn7ZkhPhHnNzdyu113ccMQc+jzzT15XYb6+0pouupfpOB+VUoJ 8IYAUFUYwcyVW3hzlwNNj9DN9IWvUWafCBwwM92kfPjJ1s2/GWxu/Btxizw6i5TSysg== 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="TpcoC4h/"; 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 CC9BE606A33F for ; Fri, 23 Oct 2026 06:50:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CC9BE606A33F 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=TpcoC4h/ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792738222; 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=TpcoC4h/wl49GuX3iNejguPvmPLL+5EJxYPO75MjR4JfuoXws/H+8v/6apmsRmByrT+sj6 UN4ZBAEcQv5vsgoGpe4ZMbExvgkX1atjotEhWYLAvXzJVFD5uUW1BcDjQfU4tPuv2qBMFQ F7UaTPmnxlae3rugeNMKjkG9ZV4Oiqk= 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-kernel@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