From patchwork Sun Mar 10 02:04:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13587978 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1B4A3C07 for ; Sun, 10 Mar 2024 02:05:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710036334; cv=none; b=HhztN7xaP4Z+SxnEivg+z5I3vFQqffte/6rrFcuHkIwpggTRqe2/NfTg9UGE7UW6yqrXsLE7aYBUneHBFTdcrBgEWnEacF32yVvb1iS/Zm1CCNeycfmCxMndNJY5PNkDb0birN7rU3avQ0JC9OHxE7jTh/jAV+jzgtY3y7BbIUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710036334; c=relaxed/simple; bh=as7KSNoSZZw9qpo+zjIfLwBqz9yg94llh3SNLLkBgkY=; h=Date:Message-Id:Mime-Version:Subject:From:To:Content-Type; b=K/KAptknWEFidcZ77of4DM5gbQI4br3RysfxFQrEhWYA9T1moKuFke7vQ0dmHUpSuqfMMW58oKDR9qFmwxiGM2f12aGIPVOh+025QzLlZa3ZXWBewg/AhvcIt9mftZYrJ4t+t8epLXlIpK+hGGiwDPvOxrOi7jxGho/IyOOwL+4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=thYILaaq; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="thYILaaq" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-29b99e98a1bso2715098a91.1 for ; Sat, 09 Mar 2024 18:05:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710036331; x=1710641131; darn=vger.kernel.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=eHEIYqeti5loGAbMg5pT9rTzLm2kPQlk4+PZDUbNnbs=; b=thYILaaq0N8hztWo1a6G6Gna5tcUK7A8Pr9P0KTYl8eXkQzu4f5M4gJuRJSyTWIsCG I4+QDYfzsbg9YxV+Pjyu8vHBAZ5FXW7QkIz/FGBv1PaWK7/Hwc7GlhTPmH8gruT+4uL/ t7bcVG7ZWNg4aqJH0Ercooi2T+Np4zQcIj4qfRsp7ZEMxNrXdDwL6uvnTYvKRiqUW+VF fwnluvnGaF2iqIWxm85sua6JPALE5wQSdzUuT5inUmSxZpQLR8kKYdMKiZ7xkjpm3Q1F WmIWPij3/Zcwd3sXtc2oWy1QtJWi4K1YxwfWZE9jznqUNPwflSNeHC/DhsrRKQK9ipoE kUew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710036331; x=1710641131; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eHEIYqeti5loGAbMg5pT9rTzLm2kPQlk4+PZDUbNnbs=; b=LPcM9oVF7Kl2kokalm5ZT6UbdjXMwWV1oQdytFEPIvnSFR/eOo/HbOeclb14uKifTn HO/RBXu+W0Z0LCZv08jXrN+hemjceTDvhM/M8pP7u9i7m9EjiM66tLcu0oeYgVDSafty NQdxck6LwrJhbfY8cO/nSPHBCY3Bu+90E5YZQ4BePQCW0wQMTGOiGF0XczcihsJ+GsNf ieX9qRoSsaD/1mvYPAYrXkJWb4epYNux1Fb8mmHoicFIhEu9JITC4DrV3/Ms8IfBvVxN UluaFBaIxZADhtVu3CmRhLGlj88EAGCIloI4+u5rBxS5JTezTK4W9bUp/ugsruthQKS8 awAQ== X-Forwarded-Encrypted: i=1; AJvYcCVYXomDV0C888+e3gNzzUIm5eoyBdIKVLr2YgGgSaxushlyq6/hIIcHk3g14CVPryjVGpnjjrN7lNyFOh2Ulm3wufgU X-Gm-Message-State: AOJu0Yx2Azu5SI48glE7ENPgJ1gSMhQxEi7n40Oa2UELZ+J4v91Rj16Z GF5Pgev9wUfX0oVz2HqS8Nhzrlqi53RS7qinjKDvv++i+nTwb7Ppo9Jj7VEOLgZxibIj6o9iiAW lVPCQHA== X-Google-Smtp-Source: AGHT+IFFeRmPXH/DhdnrjLnsP7WPRqqtOIbezxRAyR/jnJBja3zK8/JuocE9C3SHGAEjuI8M5e1xF7iOTDOC X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:a63d:1b65:e810:3ad3]) (user=irogers job=sendgmr) by 2002:a17:90b:3804:b0:29b:b854:54ad with SMTP id mq4-20020a17090b380400b0029bb85454admr192655pjb.0.1710036330740; Sat, 09 Mar 2024 18:05:30 -0800 (PST) Date: Sat, 9 Mar 2024 18:04:55 -0800 Message-Id: <20240310020509.647319-1-irogers@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v1 00/13] tools header compiler.h update From: Ian Rogers To: Arnd Bergmann , Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Ian Rogers , Adrian Hunter , Paolo Bonzini , Shuah Khan , Kees Cook , "Gustavo A. R. Silva" , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andrew Morton , Liam Howlett , Miguel Ojeda , Will Deacon , Mark Brown , David Laight , "Michael S. Tsirkin" , Shunsuke Mie , Yafang Shao , Kui-Feng Lee , James Clark , Nick Forrington , Leo Yan , German Gomez , Rob Herring , John Garry , Sean Christopherson , Anup Patel , Fuad Tabba , Andrew Jones , Chao Peng , Haibo Xu , Peter Xu , Vishal Annapurve , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev Update tools/include/linux/compiler.h so that the definition of noinline can be updated to avoid an LLVM libc breakage. Fix build issues and try to synchronize other pieces on the way. For atomic.h, don't try to synchronize and just punt to stdatomic.h that we can assume is present since the move to C11. Ian Rogers (13): tools bpf: Synchronize bpf.h with kernel uapi version libbpf: Make __printf define conditional libperf xyarray: Use correct stddef.h include perf expr: Add missing stdbool.h include perf expr: Tidy up header guard perf debug: Add missing linux/types.h include perf cacheline: Add missing linux/types.h include perf arm-spe: Add missing linux/types.h include tools headers: Rewrite linux/atomic.h using C11's stdatomic.h asm-generic: Avoid transitive dependency for unaligned.h tools headers: Sync linux/overflow.h tools headers: Sync compiler.h headers tools headers: Rename noinline to __noinline include/asm-generic/unaligned.h | 2 + tools/arch/x86/include/asm/atomic.h | 84 ---- tools/include/asm-generic/atomic-gcc.h | 95 ---- tools/include/asm-generic/bitops/non-atomic.h | 1 + tools/include/asm-generic/unaligned.h | 2 + tools/include/asm/atomic.h | 11 - tools/include/asm/rwonce.h | 63 +++ tools/include/linux/atomic.h | 107 ++++- tools/include/linux/compiler-clang.h | 124 +++++ tools/include/linux/compiler-gcc.h | 145 +++++- tools/include/linux/compiler.h | 221 ++------- tools/include/linux/compiler_attributes.h | 449 ++++++++++++++++++ tools/include/linux/compiler_types.h | 171 ++++++- tools/include/linux/overflow.h | 331 ++++++++++--- tools/include/linux/rbtree.h | 1 + tools/include/linux/string.h | 1 + tools/include/linux/types.h | 17 +- tools/include/uapi/linux/bpf.h | 1 + tools/lib/bpf/libbpf.c | 4 +- tools/lib/perf/include/internal/xyarray.h | 2 +- tools/perf/arch/x86/tests/bp-modify.c | 4 +- tools/perf/bench/find-bit-bench.c | 2 +- tools/perf/check-headers.sh | 4 + tools/perf/tests/bp_account.c | 2 +- tools/perf/tests/bp_signal.c | 2 +- tools/perf/tests/bp_signal_overflow.c | 2 +- tools/perf/tests/dwarf-unwind.c | 12 +- tools/perf/tests/workloads/leafloop.c | 8 +- tools/perf/tests/workloads/thloop.c | 4 +- .../util/arm-spe-decoder/arm-spe-decoder.h | 1 + .../arm-spe-decoder/arm-spe-pkt-decoder.c | 8 +- tools/perf/util/cacheline.h | 1 + tools/perf/util/debug.h | 1 + tools/perf/util/expr.h | 8 +- .../selftests/kvm/include/kvm_util_base.h | 3 +- 35 files changed, 1388 insertions(+), 506 deletions(-) delete mode 100644 tools/arch/x86/include/asm/atomic.h delete mode 100644 tools/include/asm-generic/atomic-gcc.h delete mode 100644 tools/include/asm/atomic.h create mode 100644 tools/include/asm/rwonce.h create mode 100644 tools/include/linux/compiler-clang.h create mode 100644 tools/include/linux/compiler_attributes.h