Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3789655pxv; Tue, 13 Jul 2021 03:55:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztDLIOSq2RH5qyPR1XRWBqf9bwapAA/y2Tit8zRrw/kn3ijVvpGMmQDmXaIUlLf3YxHamd X-Received: by 2002:a05:6638:c4a:: with SMTP id g10mr3461840jal.21.1626173710809; Tue, 13 Jul 2021 03:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626173710; cv=none; d=google.com; s=arc-20160816; b=HPuYocxeoTrQb6R22UXKM/LJEYM3l2QFPYu/hxeX/Zb/2p2FZdQW/sOGYu/Nd9Fglq zO3yferVzSDVR9W1INOx4rCg/48Ql6V5zoU7qt8Enakb/6cVOi9WPMb0bJSnV8op4VX2 80Wmq8/Ro2+Y9ok6/fu2tdTuh5bH1kdau7uVDlCaUX8wayeVMRuMwAvDfmGMFhlVizb3 ivHT+F8M4lFAsbWV4p2rPv2fpFnWjruR7/slH2smKbgPiasRqX3wLovOyHMkIjFAXe6G dYwsfp7eu+TeJEVtrul2e19MXsVTSFpxZ7HsV+PTjgJSRUZKg2jUyMemX9TBrRWu5l9+ fBpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=9D4jyr8/GkubSp2rRvl6LXlm4t0OAb3JTURf3hTuBs8=; b=iwe38X2ko4MYecUPNulOouCO/KpH/s8gwU7Z3dqzx4lLNPY8eIFzRYzIg+UUTn5GrN 9STA1rwxlUakF76YyIoStMYvF1upBDMjbDjRGVxE1edmHZi5k7zY+RVnibpOKfADKY/e 1Y8x4CPkwvXardfje/GHmDC9J0D8I/1jnAB8YR1l8jCIVlZA1bsuKU4NXIcD77eSOWv6 neugpvZ8D8U6U7PZG95iuovvj0GF93BcXVXiRsH04ADlzZ20f7Zpjodx7SDo5ody0a2I G3+yzwScqwHNza2RFnqFS1WbvwwzLinf+zlBjwqCD1OBxuh08ttL7Jwl5Snckw3NYlKx jxpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si15044455iol.42.2021.07.13.03.54.58; Tue, 13 Jul 2021 03:55:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235838AbhGMKz7 (ORCPT + 99 others); Tue, 13 Jul 2021 06:55:59 -0400 Received: from foss.arm.com ([217.140.110.172]:40762 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235814AbhGMKzy (ORCPT ); Tue, 13 Jul 2021 06:55:54 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BDEC31FB; Tue, 13 Jul 2021 03:53:04 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A1BB23F7D8; Tue, 13 Jul 2021 03:53:03 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: Mark Rutland , Boqun Feng , Daniel Axtens , Ingo Molnar , Marco Elver , Peter Zijlstra , Will Deacon Subject: [PATCH 3/5] locking/atomic: centralize generated headers Date: Tue, 13 Jul 2021 11:52:51 +0100 Message-Id: <20210713105253.7615-4-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210713105253.7615-1-mark.rutland@arm.com> References: <20210713105253.7615-1-mark.rutland@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The generated atomic headers are only intended to be included directly by , but are spread across include/linux/ and include/asm-generic/, where people mnay be encouraged to include them. This patch centralizes them under include/linux/atomic/. Other than the header guards and hashes, there is no change to any of the generated headers as a result of this patch. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Daniel Axtens Cc: Ingo Molnar Cc: Marco Elver Cc: Peter Zijlstra Cc: Will Deacon --- include/linux/atomic.h | 7 +++---- include/linux/{ => atomic}/atomic-arch-fallback.h | 0 include/{asm-generic => linux/atomic}/atomic-instrumented.h | 8 ++++---- include/{asm-generic => linux/atomic}/atomic-long.h | 8 ++++---- scripts/atomic/check-atomics.sh | 6 +++--- scripts/atomic/gen-atomic-instrumented.sh | 6 +++--- scripts/atomic/gen-atomic-long.sh | 6 +++--- scripts/atomic/gen-atomics.sh | 6 +++--- 8 files changed, 23 insertions(+), 24 deletions(-) rename include/linux/{ => atomic}/atomic-arch-fallback.h (100%) rename include/{asm-generic => linux/atomic}/atomic-instrumented.h (99%) rename include/{asm-generic => linux/atomic}/atomic-long.h (99%) diff --git a/include/linux/atomic.h b/include/linux/atomic.h index ed1d3ffd5b9d..1896a58b5aba 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h @@ -77,9 +77,8 @@ __ret; \ }) -#include -#include - -#include +#include +#include +#include #endif /* _LINUX_ATOMIC_H */ diff --git a/include/linux/atomic-arch-fallback.h b/include/linux/atomic/atomic-arch-fallback.h similarity index 100% rename from include/linux/atomic-arch-fallback.h rename to include/linux/atomic/atomic-arch-fallback.h diff --git a/include/asm-generic/atomic-instrumented.h b/include/linux/atomic/atomic-instrumented.h similarity index 99% rename from include/asm-generic/atomic-instrumented.h rename to include/linux/atomic/atomic-instrumented.h index bc45af52c93b..f6fe36c428df 100644 --- a/include/asm-generic/atomic-instrumented.h +++ b/include/linux/atomic/atomic-instrumented.h @@ -14,8 +14,8 @@ * arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid * double instrumentation. */ -#ifndef _ASM_GENERIC_ATOMIC_INSTRUMENTED_H -#define _ASM_GENERIC_ATOMIC_INSTRUMENTED_H +#ifndef _LINUX_ATOMIC_INSTRUMENTED_H +#define _LINUX_ATOMIC_INSTRUMENTED_H #include #include @@ -1333,5 +1333,5 @@ atomic64_dec_if_positive(atomic64_t *v) arch_cmpxchg_double_local(__ai_ptr, __VA_ARGS__); \ }) -#endif /* _ASM_GENERIC_ATOMIC_INSTRUMENTED_H */ -// 1d7c3a25aca5c7fb031c307be4c3d24c7b48fcd5 +#endif /* _LINUX_ATOMIC_INSTRUMENTED_H */ +// 5edd72f105b6f54b7e9492d794abee88e6912d29 diff --git a/include/asm-generic/atomic-long.h b/include/linux/atomic/atomic-long.h similarity index 99% rename from include/asm-generic/atomic-long.h rename to include/linux/atomic/atomic-long.h index 073cf40f431b..e40e480e175f 100644 --- a/include/asm-generic/atomic-long.h +++ b/include/linux/atomic/atomic-long.h @@ -3,8 +3,8 @@ // Generated by scripts/atomic/gen-atomic-long.sh // DO NOT MODIFY THIS FILE DIRECTLY -#ifndef _ASM_GENERIC_ATOMIC_LONG_H -#define _ASM_GENERIC_ATOMIC_LONG_H +#ifndef _LINUX_ATOMIC_LONG_H +#define _LINUX_ATOMIC_LONG_H #include #include @@ -1010,5 +1010,5 @@ atomic_long_dec_if_positive(atomic_long_t *v) } #endif /* CONFIG_64BIT */ -#endif /* _ASM_GENERIC_ATOMIC_LONG_H */ -// a624200981f552b2c6be4f32fe44da8289f30d87 +#endif /* _LINUX_ATOMIC_LONG_H */ +// c5552b5d78a0c7584dfd03cba985e78a1a86bbed diff --git a/scripts/atomic/check-atomics.sh b/scripts/atomic/check-atomics.sh index 9c7fbd4bcbce..0e7bab3eb0d1 100755 --- a/scripts/atomic/check-atomics.sh +++ b/scripts/atomic/check-atomics.sh @@ -14,9 +14,9 @@ if [ $? -ne 0 ]; then fi cat < #include @@ -158,5 +158,5 @@ gen_xchg "cmpxchg_double_local" "2 * " cat < #include @@ -98,5 +98,5 @@ done cat < ${LINUXDIR}/include/${header} -- 2.11.0