Skip to content

Commit

Permalink
ci, docs, patches: skip some files for 5.15.y
Browse files Browse the repository at this point in the history
  • Loading branch information
whentojump committed Jul 19, 2024
1 parent a4e5363 commit 3655b01
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/2_pull_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ cd $MCDC_HOME/linux
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0001-llvm-cov-add-Clang-s-Source-based-Code-Coverage-supp.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0002-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0003-llvm-cov-add-Clang-s-MC-DC-support.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0004-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
1 change: 1 addition & 0 deletions docs/measure-kernel-mcdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ cd $MCDC_HOME/linux
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0001-llvm-cov-add-Clang-s-Source-based-Code-Coverage-supp.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0002-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0003-llvm-cov-add-Clang-s-MC-DC-support.patch
git apply $MCDC_HOME/linux-mcdc/patches/v0.6/0004-kbuild-llvm-cov-disable-instrumentation-in-odd-or-se.patch
```

## 3. Get LLVM
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
From 0f3be98299c1331dd6a8d1fb0ad7bf94f18f2ebe Mon Sep 17 00:00:00 2001
From: Wentao Zhang <[email protected]>
Date: Thu, 18 Jul 2024 13:12:23 -0500
Subject: [RFC PATCH 4/4] kbuild, llvm-cov: disable instrumentation in odd or
sensitive code

Skip some extra files in kernel 5.15.y that are problematic with LLVM 19
MC/DC instrumentation.

Signed-off-by: Wentao Zhang <[email protected]>
---
arch/x86/kernel/cpu/mtrr/Makefile | 3 +++
drivers/base/power/Makefile | 3 +++
drivers/gpu/drm/i915/Makefile | 3 +++
drivers/net/ethernet/intel/e1000/Makefile | 2 ++
net/ipv4/Makefile | 2 ++
5 files changed, 13 insertions(+)

diff --git a/arch/x86/kernel/cpu/mtrr/Makefile b/arch/x86/kernel/cpu/mtrr/Makefile
index cc4f9f1cb..443a5bf03 100644
--- a/arch/x86/kernel/cpu/mtrr/Makefile
+++ b/arch/x86/kernel/cpu/mtrr/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+LLVM_COV_PROFILE_generic.o := n
+
obj-y := mtrr.o if.o generic.o cleanup.o
obj-$(CONFIG_X86_32) += amd.o cyrix.o centaur.o

diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index 8fdd0073e..ac1f2f4f6 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
+
+LLVM_COV_PROFILE_main.o := n
+
obj-$(CONFIG_PM) += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o
obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o wakeup_stats.o
obj-$(CONFIG_PM_TRACE_RTC) += trace.o
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 9d371be7d..b24919604 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,6 +12,9 @@
# Note the danger in using -Wall -Wextra is that when CI updates gcc we
# will most likely get a sudden build breakage... Hopefully we will fix
# new warnings before CI updates!
+
+LLVM_COV_PROFILE_intel_bios.o := n
+
subdir-ccflags-y := -Wall -Wextra
subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
subdir-ccflags-y += $(call cc-disable-warning, type-limits)
diff --git a/drivers/net/ethernet/intel/e1000/Makefile b/drivers/net/ethernet/intel/e1000/Makefile
index 314c52d44..a3c4caa6c 100644
--- a/drivers/net/ethernet/intel/e1000/Makefile
+++ b/drivers/net/ethernet/intel/e1000/Makefile
@@ -5,6 +5,8 @@
# Makefile for the Intel(R) PRO/1000 ethernet driver
#

+LLVM_COV_PROFILE_e1000_main.o := n
+
obj-$(CONFIG_E1000) += e1000.o

e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index bbdd9c44f..779dcf156 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -3,6 +3,8 @@
# Makefile for the Linux TCP/IP (INET) layer.
#

+LLVM_COV_PROFILE_ipconfig.o := n
+
obj-y := route.o inetpeer.o protocol.o \
ip_input.o ip_fragment.o ip_forward.o ip_options.o \
ip_output.o ip_sockglue.o inet_hashtables.o \
--
2.34.1

2 changes: 2 additions & 0 deletions patches/v0.6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Note: patch 0004 is only needed for 5.15.y but not mainline. We won't include it
in our patch 1.0.

0 comments on commit 3655b01

Please sign in to comment.