From 753e6d5d5444abc0b716a58d37065cb889f85662ba475870dc8b11a45c13ede0 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Thu, 1 Feb 2024 08:49:01 +0000 Subject: [PATCH] Accepting request 1143220 from home:michals - Update character device patches to current version. * folded link-lpthread.patch into 0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch OBS-URL: https://build.opensuse.org/request/show/1143220 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/librtas?expand=0&rev=69 --- ...-low-level-RTAS-call-APIs-internally.patch | 5 ++-- ...s-move-VPD-code-into-separate-module.patch | 5 ++-- ...tem-parameter-code-to-separate-modul.patch | 5 ++-- 0004-librtas-vendor-papr-miscdev.h.patch | 5 ++-- ...d-prefer-dev-papr-vpd-when-available.patch | 26 ++++++++++++------- ...prefer-dev-papr-sysparm-when-availab.patch | 11 ++++---- librtas-doc.spec | 3 +-- librtas.changes | 6 +++++ librtas.spec | 3 +-- link-lpthread.patch | 15 ----------- 10 files changed, 42 insertions(+), 42 deletions(-) delete mode 100644 link-lpthread.patch diff --git a/0001-librtas-expose-low-level-RTAS-call-APIs-internally.patch b/0001-librtas-expose-low-level-RTAS-call-APIs-internally.patch index 920e918..887ab29 100644 --- a/0001-librtas-expose-low-level-RTAS-call-APIs-internally.patch +++ b/0001-librtas-expose-low-level-RTAS-call-APIs-internally.patch @@ -1,4 +1,4 @@ -From 0d48bdca32cbf7a83bcaa5a27e3454d24055e0cb Mon Sep 17 00:00:00 2001 +From 569da8e5f0d5009694dc2def350cb9cd2c1d81a6 Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Sat, 12 Aug 2023 12:41:36 -0500 Subject: [PATCH 1/6] librtas: expose low-level RTAS call APIs internally @@ -10,6 +10,7 @@ The implementations of librtas APIs will move into separate C files as they gain support for new interfaces offered by the kernel. Signed-off-by: Nathan Lynch +Signed-off-by: Tyrel Datwyler --- librtas_src/internal.h | 5 +++++ librtas_src/syscall_calls.c | 11 ++++++----- @@ -75,5 +76,5 @@ index 1e09217..eabc5ea 100644 va_list ap; int rc, token; -- -2.42.0 +2.43.0 diff --git a/0002-librtas-move-VPD-code-into-separate-module.patch b/0002-librtas-move-VPD-code-into-separate-module.patch index fb16937..b9327a6 100644 --- a/0002-librtas-move-VPD-code-into-separate-module.patch +++ b/0002-librtas-move-VPD-code-into-separate-module.patch @@ -1,4 +1,4 @@ -From 12a2764fd7efe7c52b53579a67edb641d662f54f Mon Sep 17 00:00:00 2001 +From ee06898b1e7807a6e201b281ffc8ee3fa96136f4 Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Sat, 12 Aug 2023 12:44:38 -0500 Subject: [PATCH 2/6] librtas: move VPD code into separate module @@ -8,6 +8,7 @@ interface exposed by newer kernels. This will be a lot of additional code, so move it out of syscall_calls.c. Signed-off-by: Nathan Lynch +Signed-off-by: Tyrel Datwyler --- Makefile.am | 1 + librtas_src/syscall_calls.c | 67 ------------------------------ @@ -193,5 +194,5 @@ index 0000000..b2689fb + return rc ? rc : status; +} -- -2.42.0 +2.43.0 diff --git a/0003-librtas-move-system-parameter-code-to-separate-modul.patch b/0003-librtas-move-system-parameter-code-to-separate-modul.patch index 30b2da6..6695781 100644 --- a/0003-librtas-move-system-parameter-code-to-separate-modul.patch +++ b/0003-librtas-move-system-parameter-code-to-separate-modul.patch @@ -1,4 +1,4 @@ -From 80dfb541257cb88519855543324478cbb0f1f1b3 Mon Sep 17 00:00:00 2001 +From c47176a5f1ce7bb16ba02b8c8520e02b285d7e9f Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Mon, 25 Sep 2023 11:32:33 -0500 Subject: [PATCH 3/6] librtas: move system parameter code to separate module @@ -8,6 +8,7 @@ different interface exposed by newer kernels. This will involve adding a nontrivial amount of code, so move it out of syscall_calls.c. Signed-off-by: Nathan Lynch +Signed-off-by: Tyrel Datwyler --- Makefile.am | 3 +- librtas_src/syscall_calls.c | 84 ----------------------------------- @@ -226,5 +227,5 @@ index 0000000..40af55e + return rc ? rc : status; +} -- -2.42.0 +2.43.0 diff --git a/0004-librtas-vendor-papr-miscdev.h.patch b/0004-librtas-vendor-papr-miscdev.h.patch index 916d277..23dd5a3 100644 --- a/0004-librtas-vendor-papr-miscdev.h.patch +++ b/0004-librtas-vendor-papr-miscdev.h.patch @@ -1,4 +1,4 @@ -From ba86b513cbed32f5cdf8840b727457688a0737fb Mon Sep 17 00:00:00 2001 +From c914a1a701391c565203b10603ad0fbc52438bf7 Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Mon, 25 Sep 2023 11:41:22 -0500 Subject: [PATCH 4/6] librtas: vendor papr-miscdev.h @@ -7,6 +7,7 @@ This is a common header used by other kernel uapi headers that we will copy into the source tree. Signed-off-by: Nathan Lynch +Signed-off-by: Tyrel Datwyler --- Makefile.am | 4 +++- librtas_src/papr-miscdev.h | 9 +++++++++ @@ -44,5 +45,5 @@ index 0000000..c0b1072 + +#endif /* _UAPI_PAPR_MISCDEV_H_ */ -- -2.42.0 +2.43.0 diff --git a/0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch b/0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch index 6a83f03..c02ddbc 100644 --- a/0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch +++ b/0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch @@ -1,12 +1,10 @@ -From 3fffa2c147a69fac72b0159be967ecbe9c751dfb Mon Sep 17 00:00:00 2001 +From 57d5e1c07b40e56f6209e7b806208818464f8e8d Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Sat, 12 Aug 2023 13:27:39 -0500 Subject: [PATCH 5/6] librtas/vpd: prefer /dev/papr-vpd when available -Change rtas_get_vpd() to prefer the /dev/papr-vpd character device as -proposed for the kernel here: - -https://lore.kernel.org/linuxppc-dev/20230822-papr-sys_rtas-vs-lockdown-v1-0-932623cf3c7b@linux.ibm.com/ +Change rtas_get_vpd() to prefer the /dev/papr-vpd character device +expected in Linux v6.8. On the first invocation of rtas_get_vpd(), probe for the new ABI and initialize an internal function pointer according to the result. Use @@ -46,17 +44,27 @@ change. This is the primary (and perhaps only) user of rtas_get_vpd(). For now, carry a copy of the kernel uapi header. Signed-off-by: Nathan Lynch +Signed-off-by: Tyrel Datwyler --- - Makefile.am | 3 +- + Makefile.am | 5 +- librtas_src/papr-vpd.h | 22 ++++++ librtas_src/vpd.c | 155 ++++++++++++++++++++++++++++++++++++----- - 3 files changed, 161 insertions(+), 19 deletions(-) + 3 files changed, 162 insertions(+), 20 deletions(-) create mode 100644 librtas_src/papr-vpd.h diff --git a/Makefile.am b/Makefile.am -index d0cabfb..d3513e9 100644 +index d0cabfb..89a6eaa 100644 --- a/Makefile.am +++ b/Makefile.am +@@ -26,7 +26,7 @@ LIBRTAS_AGE = 0 + LIBRTAS_LIBRARY_VERSION = $(LIBRTAS_CURRENT):$(LIBRTAS_REVISION):$(LIBRTAS_AGE) + + lib_LTLIBRARIES += librtas.la +-librtas_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION) ++librtas_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION) -lpthread + librtas_la_SOURCES = \ + librtas_src/vpd.c \ + librtas_src/ofdt.c \ @@ -37,7 +37,8 @@ librtas_la_SOURCES = \ library_include_HEADERS += librtas_src/librtas.h noinst_HEADERS += \ @@ -275,5 +283,5 @@ index b2689fb..544560f 100644 + seq_next, bytes_ret); +} -- -2.42.0 +2.43.0 diff --git a/0006-librtas-sysparm-prefer-dev-papr-sysparm-when-availab.patch b/0006-librtas-sysparm-prefer-dev-papr-sysparm-when-availab.patch index b64dee0..334bc33 100644 --- a/0006-librtas-sysparm-prefer-dev-papr-sysparm-when-availab.patch +++ b/0006-librtas-sysparm-prefer-dev-papr-sysparm-when-availab.patch @@ -1,12 +1,10 @@ -From c98bf4d902821cfeb83cd6037a36a0bf208f842c Mon Sep 17 00:00:00 2001 +From d8d4ee6f5052704ac82bb8aa8d8fe8816dac41cd Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Mon, 25 Sep 2023 11:42:26 -0500 Subject: [PATCH 6/6] librtas/sysparm: prefer /dev/papr-sysparm when available Change rtas_get_sysparm() and rtas_set_sysparm() to prefer the -/dev/papr-sysparm character device as proposed for the kernel here: - -[[[ FIXME ]]] +/dev/papr-sysparm character device expected in Linux v6.8. On the first invocation of either function, probe for the new ABI and initialize internal function pointers according to the result. Use @@ -24,6 +22,7 @@ recognize. For now, carry a copy of the kernel uapi header. Signed-off-by: Nathan Lynch +Signed-off-by: Tyrel Datwyler --- Makefile.am | 1 + librtas_src/papr-sysparm.h | 58 +++++++++++++++ @@ -32,7 +31,7 @@ Signed-off-by: Nathan Lynch create mode 100644 librtas_src/papr-sysparm.h diff --git a/Makefile.am b/Makefile.am -index d3513e9..29b3b76 100644 +index 89a6eaa..67257e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,6 +38,7 @@ library_include_HEADERS += librtas_src/librtas.h @@ -282,5 +281,5 @@ index 40af55e..b4d2054 100644 + return set_sysparm_fn(parameter, data); +} -- -2.42.0 +2.43.0 diff --git a/librtas-doc.spec b/librtas-doc.spec index c06b006..70f9a26 100644 --- a/librtas-doc.spec +++ b/librtas-doc.spec @@ -1,7 +1,7 @@ # # spec file for package librtas-doc # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,7 +33,6 @@ Patch3: 0003-librtas-move-system-parameter-code-to-separate-modul.patch Patch4: 0004-librtas-vendor-papr-miscdev.h.patch Patch5: 0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch Patch6: 0006-librtas-sysparm-prefer-dev-papr-sysparm-when-availab.patch -Patch7: link-lpthread.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: doxygen diff --git a/librtas.changes b/librtas.changes index d15ffa5..1abbcc1 100644 --- a/librtas.changes +++ b/librtas.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 1 08:44:01 UTC 2024 - Michal Suchanek + +- Update character device patches to current version. + * folded link-lpthread.patch into 0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch + ------------------------------------------------------------------- Mon Nov 20 16:14:19 UTC 2023 - Michal Suchanek diff --git a/librtas.spec b/librtas.spec index 76e22f8..ebc3e12 100644 --- a/librtas.spec +++ b/librtas.spec @@ -1,7 +1,7 @@ # # spec file for package librtas # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -35,7 +35,6 @@ Patch3: 0003-librtas-move-system-parameter-code-to-separate-modul.patch Patch4: 0004-librtas-vendor-papr-miscdev.h.patch Patch5: 0005-librtas-vpd-prefer-dev-papr-vpd-when-available.patch Patch6: 0006-librtas-sysparm-prefer-dev-papr-sysparm-when-availab.patch -Patch7: link-lpthread.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool diff --git a/link-lpthread.patch b/link-lpthread.patch deleted file mode 100644 index cfce39d..0000000 --- a/link-lpthread.patch +++ /dev/null @@ -1,15 +0,0 @@ -librtas now uses pthread_once - -diff -ur librtas-2.0.5.orig/Makefile.am librtas-2.0.5/Makefile.am ---- librtas-2.0.5.orig/Makefile.am 2023-11-23 20:42:40.488274968 +0100 -+++ librtas-2.0.5/Makefile.am 2023-11-23 20:46:55.600974184 +0100 -@@ -26,7 +26,7 @@ - LIBRTAS_LIBRARY_VERSION = $(LIBRTAS_CURRENT):$(LIBRTAS_REVISION):$(LIBRTAS_AGE) - - lib_LTLIBRARIES += librtas.la --librtas_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION) -+librtas_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION) -lpthread - librtas_la_SOURCES = \ - librtas_src/vpd.c \ - librtas_src/ofdt.c \ -Only in librtas-2.0.5: Makefile.am~