diff --git a/0001-Add-support-for-loongarch.patch b/0001-Add-support-for-loongarch.patch deleted file mode 100644 index 3b5270998d01c0ae3c904a9ad65613894607ea9c..0000000000000000000000000000000000000000 --- a/0001-Add-support-for-loongarch.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./src/stalld.h.old ./src/stalld.h ---- ./src/stalld.h.old 2023-07-20 10:28:58.525933347 +0800 -+++ ./src/stalld.h 2023-07-20 10:29:25.674132507 +0800 -@@ -83,7 +83,7 @@ struct cpu_info { - #elif __arm__ - # define __NR_sched_setattr 380 - # define __NR_sched_getattr 381 --#elif __aarch64__ -+#elif __aarch64__ || __loongarch64 - # define __NR_sched_setattr 274 - # define __NR_sched_getattr 275 - #elif __powerpc__ diff --git a/riscv_support.patch b/riscv_support.patch new file mode 100644 index 0000000000000000000000000000000000000000..c9cf134a1cbfa1a8b8634b7df21efeb3f3827299 --- /dev/null +++ b/riscv_support.patch @@ -0,0 +1,30 @@ +diff --git a/Makefile b/Makefile +index f866a74..76aefe2 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,6 +34,12 @@ USE_BPF := 0 + FCF_PROTECTION := $(CF_PROTECTION_OPTS) + TMOPTS := -mtune=powerpc + endif ++ifeq ($(ARCH),riscv64) ++USE_BPF :=0 ++FCF_PROTECTION := $(CF_PROTECTION_OPTS) ++TMOPTS := -march=rv64gc -mabi=lp64d ++endif ++ + + $(info USE_BPF=$(USE_BPF)) + $(info FCF_PROTECTION=$(FCF_PROTECTION)) +diff --git a/src/stalld.h b/src/stalld.h +index a5b9dbc..7362d4e 100644 +--- a/src/stalld.h ++++ b/src/stalld.h +@@ -119,7 +119,7 @@ struct stalld_backend { + #elif __arm__ + # define __NR_sched_setattr 380 + # define __NR_sched_getattr 381 +-#elif __aarch64__ || __loongarch64 ++#elif __aarch64__ || __loongarch64 || __riscv + # define __NR_sched_setattr 274 + # define __NR_sched_getattr 275 + #elif __powerpc__ diff --git a/stalld-1.16.tar.bz2 b/stalld-1.16.tar.bz2 deleted file mode 100644 index fc121f9a68e48da3cdfc49a24626f43e96bddd16..0000000000000000000000000000000000000000 Binary files a/stalld-1.16.tar.bz2 and /dev/null differ diff --git a/stalld-v1.19.1.tar.bz2 b/stalld-v1.19.1.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..ec0ed6e027893bddb330d8396de6747dc001cfdc Binary files /dev/null and b/stalld-v1.19.1.tar.bz2 differ diff --git a/stalld.spec b/stalld.spec index fe5493fe23c4db205980f65e0c8b1e87d756c776..6d077297ac537fc79fcb548ce4ad6e72995909a2 100644 --- a/stalld.spec +++ b/stalld.spec @@ -1,12 +1,12 @@ Name: stalld -Version: 1.16 -Release: 3 +Version: v1.19.1 +Release: 1 Summary: Daemon that finds starving tasks and gives them a temporary boost License: GPLv2 URL: https://gitlab.com/rt-linux-tools/%{name} -Source0: https://gitlab.com/rt-linux-tools/%{name}/-/archive/v%{version}/%{name}-%{version}.tar.bz2 -Patch0: 0001-Add-support-for-loongarch.patch +Source0: https://gitlab.com/rt-linux-tools/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2 +Patch0: riscv_support.patch BuildRequires: glibc-devel BuildRequires: gcc @@ -15,6 +15,15 @@ BuildRequires: systemd Requires: systemd +%ifnarch i686 +BuildRequires: bpftool +BuildRequires: clang +BuildRequires: libbpf-devel +BuildRequires: llvm + +Requires: libbpf +%endif + %description The stalld program monitors the set of system threads, looking for threads that are ready-to-run but have not @@ -31,11 +40,10 @@ allow 10 microseconds of runtime for 1 second of clock time. %install %make_install DOCDIR=%{_docdir} MANDIR=%{_mandir} BINDIR=%{_bindir} DATADIR=%{_datadir} VERSION=%{version} -%make_install -C redhat UNITDIR=%{_unitdir} +%make_install -C systemd UNITDIR=%{_unitdir} mkdir -p %{buildroot}%{_docdir}/%{name} mv %{buildroot}%{_docdir}/README.md %{buildroot}%{_docdir}/%{name}/ - %files %{_bindir}/%{name} %{_bindir}/throttlectl @@ -55,6 +63,9 @@ mv %{buildroot}%{_docdir}/README.md %{buildroot}%{_docdir}/%{name}/ %systemd_postun_with_restart %{name}.service %changelog +* Sat Mar 23 2024 luojun - v1.19.1-1 +- update to v1.19 and support for oe-riscv + * Thu Sep 14 2023 duyiwei - 1.16-3 - move README