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=Iuh05X5TT3Xkdtwr+q2C+9g4FObRS2sutJi3jKdGVfqiAzWXYKN6bFyEMOfr+KaCk4d0 /hZ7ew3Wn9GcPvzdSHK565QtYy/xIivGa/s0/NV1LItBVBWxueFZo1kbwkqT321R52Tke I/53739Q0CB4lrAPx6vi+lp3C+l73w4csLqB30gtpNwxom6o2LSNuPDArpIE+et/q+WBN 3g4Rn9taSFXSVggtaVvCg6qSRy/fPTfikA5+w3npPzf5SyjJTeB8Z+VTrzOUmOyei/d2d 3Gqpsw780K5jVdlfR7JffF+GysurC9bnMaiYI99E0hMLSavxbX3ClcMr268Kf/fkSPw== 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:X-Scanned-By: X-Mimecast-MFC-PROC-ID:X-Mimecast-Originator: Content-Transfer-Encoding:content-type; bh=zOPcyFbcw1UU/rJPmKSSRntH9qu/8Cc9l655f2GYy5w=; b=pO/3p2YlojwZGGNQICTVnrUA01GLJRKKY/1s2I+gAGs+Nu4/E4owVU+ECLDkiQaX/W4j gjEf4yqOp8pne9udmjUX7a/1X7IAldU1DyGVkb6rC2iM0PBcHErT1cKJ3XTN3H8Po2ojq QIb6qTnX516ZRJ1GFh37oEQEUSr18AphljaAV/BDUHpyHihveKvyfhSCkcZVfLRJNtoOc REZJDGzJJalNbGs9bbbB2ZQwYD6p3jhk9yPsBkExo5fMOZIojVSu91bxnnjG/3UDImVqx vlpev56zvt0ty4d74sJFCoUpS9JfGXLo758hgnGa3yG1mY9MnOI1/UST+ievE/T/3HQ== 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=gEW3rfHc; 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 C41B4606A329 for ; Fri, 23 Oct 2026 06:50:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C41B4606A329 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=gEW3rfHc 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-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zOPcyFbcw1UU/rJPmKSSRntH9qu/8Cc9l655f2GYy5w=; b=gEW3rfHcPnP+SoqP73bKznGtJzAjT/hopYwgR+kdB+Sc/alyFY8NJkLkmj3JD2PO3UHYiX TlIy8pyzQZp50fUtyvGe1+I7/A+phiz3sTTqK9igXiNQZ2dmz+1wCsyrvAB7yJAShUb+HT qY5fFRa+57hZKpZuDuiTPcjHLz2B5Z0= 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: llvm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-MFC-PROC-ID: MAc9uvdCR6U-SfxOf31HHrhBCvq-0eLdiIpNQHJqqig_1792738216 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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