From: Prarit Bhargava <prarit(a)redhat.com>
tools/power/x86/intel-speed-select: fix build failure when using -Wl,--as-needed
Upstream Status: https://www.spinics.net/lists/platform-driver-x86/msg31958.html
Build of intel-speed-select will fail if you run:
$ LDFLAGS="-Wl,--as-needed" /usr/bin/make V=1
...
gcc -O2 -Wall -g -D_GNU_SOURCE -Iinclude -I/usr/include/libnl3 -Wl,--as-needed -lnl-genl-3 -lnl-3 intel-speed-select-in.o -o intel-speed-select
/usr/bin/ld: intel-speed-select-in.o: in function `handle_event':
(...)/linux/tools/power/x86/intel-speed-select/hfi-events.c:189: undefined reference to `nlmsg_hdr'
...
In this case the problem is that order when linking matters when using
the flag -Wl,--as-needed, symbols not used at that point are discarded.
So since intel-speed-select-in.o comes after, at that point the
libraries/symbols are already discarded and then missing/undefined
references are reported.
To fix this, make sure we specify LDFLAGS after the object file.
Signed-off-by: Herton R. Krzesinski <herton(a)redhat.com>
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/tools/power/x86/intel-speed-select/Makefile b/tools/power/x86/intel-speed-select/Makefile
index blahblah..blahblah 100644
--- a/tools/power/x86/intel-speed-select/Makefile
+++ b/tools/power/x86/intel-speed-select/Makefile
@@ -42,7 +42,7 @@ ISST_IN := $(OUTPUT)intel-speed-select-in.o
$(ISST_IN): prepare FORCE
$(Q)$(MAKE) $(build)=intel-speed-select
$(OUTPUT)intel-speed-select: $(ISST_IN)
- $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+ $(QUIET_LINK)$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
clean:
rm -f $(ALL_PROGRAMS)
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1721
From: Jarod Wilson <jarod(a)redhat.com>
redhat: indicate HEAD state in tarball/rpm name
For the non-Fedora (RHEL) case, we are looking to move to a setup where we
include Merge Requests as soon as they are ready, and thus the head of
main may not always be a tagged build. This gives some indication to
someone basing a build on main that they're basing their work on the tree
at a state between tagged builds.
If HEAD is a tagged build, as usual, you should see:
linux-4.18.0-374.el8.tar.xz
kernel-4.18.0-374.el8.src.rpm
If HEAD has additional commits, with this change, you should see:
linux-4.18.0-374.p1.g797fdad2a6e5.el8.tar.xz
kernel-4.18.0-374.p1.g797fdad2a6e5.el8.src.rpm
The .pX field is "X patches since tag" and the .gSHA field is the HEAD sha
of the branch after adding your local changes.
This is directly related to:
https://gitlab.com/redhat/rhel/src/kernel/rhel-8/-/merge_requests/2405
Signed-off-by: Jarod Wilson <jarod(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -189,6 +189,14 @@ ifeq ($(VERSION_ON_UPSTREAM),1)
endif
else
SNAPSHOT:=0
+ EXACT_TAG:=$(shell $(GIT) describe --exact-match 2>/dev/null)
+ ifeq ($(EXACT_TAG),)
+ _TAG:=$(shell $(GIT) describe 2>/dev/null)
+ ifneq ($(_TAG),)
+ RHEL_EXTRAVERSION:=$(shell echo $(_TAG) | awk -F- '{ printf(".p%d.%s", $$(NF-1),$$(NF)) }')
+ BUILD:=$(BUILD)$(RHEL_EXTRAVERSION)
+ endif
+ endif
endif
KVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1735
From: Herton R. Krzesinski <herton(a)redhat.com>
tools/power/x86/intel-speed-select: fix build failure when using -Wl,--as-needed
Upstream Status: patch submitted to platform-driver-x86/upstream maintainer
Build of intel-speed-select will fail if you run:
$ LDFLAGS="-Wl,--as-needed" /usr/bin/make V=1
...
gcc -O2 -Wall -g -D_GNU_SOURCE -Iinclude -I/usr/include/libnl3 -Wl,--as-needed -lnl-genl-3 -lnl-3 intel-speed-select-in.o -o intel-speed-select
/usr/bin/ld: intel-speed-select-in.o: in function `handle_event':
(...)/linux/tools/power/x86/intel-speed-select/hfi-events.c:189: undefined reference to `nlmsg_hdr'
...
In this case the problem is that order when linking matters when using
the flag -Wl,--as-needed, symbols not used at that point are discarded.
So since intel-speed-select-in.o comes after, at that point the
libraries/symbols are already discarded and then missing/undefined
references are reported.
To fix this, make sure we specify LDFLAGS after the object file.
Signed-off-by: Herton R. Krzesinski <herton(a)redhat.com>
diff --git a/tools/power/x86/intel-speed-select/Makefile b/tools/power/x86/intel-speed-select/Makefile
index blahblah..blahblah 100644
--- a/tools/power/x86/intel-speed-select/Makefile
+++ b/tools/power/x86/intel-speed-select/Makefile
@@ -42,7 +42,7 @@ ISST_IN := $(OUTPUT)intel-speed-select-in.o
$(ISST_IN): prepare FORCE
$(Q)$(MAKE) $(build)=intel-speed-select
$(OUTPUT)intel-speed-select: $(ISST_IN)
- $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
+ $(QUIET_LINK)$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
clean:
rm -f $(ALL_PROGRAMS)
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1736
From: Waiman Long <longman(a)redhat.com>
redhat/configs: Enable CONFIG_RCU_SCALE_TEST & CONFIG_RCU_REF_SCALE_TEST
Enable CONFIG_RCU_SCALE_TEST and CONFIG_RCU_REF_SCALE_TEST to build
the rcuscale and refscale test kernel modules to be included in
kernel-modules-internal rpm to be used for internal QE testing.
Signed-off-by: Waiman Long <longman(a)redhat.com>
diff --git a/redhat/configs/common/generic/CONFIG_RCU_REF_SCALE_TEST b/redhat/configs/common/generic/CONFIG_RCU_REF_SCALE_TEST
index blahblah..blahblah 100644
--- a/redhat/configs/common/generic/CONFIG_RCU_REF_SCALE_TEST
+++ b/redhat/configs/common/generic/CONFIG_RCU_REF_SCALE_TEST
@@ -1 +1 @@
-# CONFIG_RCU_REF_SCALE_TEST is not set
+CONFIG_RCU_REF_SCALE_TEST=m
diff --git a/redhat/configs/common/generic/CONFIG_RCU_SCALE_TEST b/redhat/configs/common/generic/CONFIG_RCU_SCALE_TEST
index blahblah..blahblah 100644
--- a/redhat/configs/common/generic/CONFIG_RCU_SCALE_TEST
+++ b/redhat/configs/common/generic/CONFIG_RCU_SCALE_TEST
@@ -1 +1 @@
-# CONFIG_RCU_SCALE_TEST is not set
+CONFIG_RCU_SCALE_TEST=m
diff --git a/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_REF_SCALE_TEST b/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_REF_SCALE_TEST
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_REF_SCALE_TEST
@@ -0,0 +1 @@
+# CONFIG_RCU_REF_SCALE_TEST is not set
diff --git a/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_SCALE_TEST b/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_SCALE_TEST
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_SCALE_TEST
@@ -0,0 +1 @@
+# CONFIG_RCU_SCALE_TEST is not set
diff --git a/redhat/configs/ark/generic/s390x/zfcpdump/CONFIG_RCU_TORTURE_TEST b/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_TORTURE_TEST
rename from redhat/configs/ark/generic/s390x/zfcpdump/CONFIG_RCU_TORTURE_TEST
rename to redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_TORTURE_TEST
index blahblah..blahblah 100644
--- a/redhat/configs/ark/generic/s390x/zfcpdump/CONFIG_RCU_TORTURE_TEST
+++ b/redhat/configs/common/generic/s390x/zfcpdump/CONFIG_RCU_TORTURE_TEST
diff --git a/redhat/mod-internal.list b/redhat/mod-internal.list
index blahblah..blahblah 100644
--- a/redhat/mod-internal.list
+++ b/redhat/mod-internal.list
@@ -45,6 +45,7 @@ test_klp_state2
test_klp_state3
torture
refscale
+rcuscale
memcpy_kunit
dev_addr_lists_test
test_hash
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1726