Skip to content

Commit 8995199

Browse files
committed
Prep for librtas-2.0.6
Signed-off-by: Tyrel Datwyler <[email protected]>
1 parent 36d73ef commit 8995199

File tree

2 files changed

+231
-1
lines changed

2 files changed

+231
-1
lines changed

Changelog

+230
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,233 @@
1+
Changelog for librtas-2.0.6
2+
=======================================
3+
commit 238bf041152b78aa0d9dce813d360ea0731c128c
4+
Author: Tyrel Datwyler <[email protected]>
5+
Date: Wed Feb 7 17:12:44 2024 -0600
6+
7+
librtas: return CALL_AGAIN on RC_BUSY status in handle_delay()
8+
9+
There is no need to delay before retrying on RC_BUSY return status. The
10+
kernel used to get this wrong too.
11+
12+
https://github.com/torvalds/linux/commit/38f7b7067dae0c101be573106018e8af22a90fdf
13+
14+
Excerpt referenced from above commit:
15+
16+
RTAS_BUSY (-2): RTAS has suspended a potentially long-running operation in
17+
order to meet its latency obligation and give the OS the opportunity to
18+
perform other work. RTAS can resume making progress as soon as the OS
19+
reattempts the call.
20+
21+
To avoid uselessly sleeping update handle_delay() to return CALL_AGAIN
22+
immediately when it is passed RC_BUSY.
23+
24+
Suggested-by: Nathan Lynch <[email protected]>
25+
Signed-off-by: Tyrel Datwyler <[email protected]>
26+
27+
commit d4348be098c7dc9b2ed313e51daee30246601e8d
28+
Author: Tyrel Datwyler <[email protected]>
29+
Date: Wed Feb 7 17:09:03 2024 -0600
30+
31+
librtas: use CALL_AGAIN for delay related return in handle_delay()
32+
33+
The delay related return value of handle_delay() is hard coded. For
34+
clarity use CALL_AGAIN macro which is documented return value in the
35+
function comment header.
36+
37+
Signed-off-by: Tyrel Datwyler <[email protected]>
38+
39+
commit e7eff65e74ebe268a184d53d5fe94ebff5f7b4eb
40+
Author: Tyrel Datwyler <[email protected]>
41+
Date: Wed Feb 7 14:13:30 2024 -0800
42+
43+
librtas: deprecate rtas_delay_timeout()
44+
45+
Despite its description rtas_delay_timeout() sets an internal timeout
46+
value as opposed to returning the delay time as documented. This timeout
47+
short cuts the logic in handle_delay(). Fortunately this is unsed by
48+
default. The library should run operations to completion, otherwise we
49+
risk leaving things in an unrecoverable state.
50+
51+
Mark rtas_delay_timeout() with __attribute__ ((deprecated)) as
52+
preperation for eventual removal.
53+
54+
Signed-off-by: Tyrel Datwyler <[email protected]>
55+
56+
commit b8d34050883008a92bad84ae707de7c1b96119a8
57+
Author: Nathan Lynch <[email protected]>
58+
Date: Wed Feb 7 15:20:24 2024 -0600
59+
60+
librtas: sync papr-sysparm.h with kernel
61+
62+
The data member is __u8 as of 8ded03ae48b3
63+
("powerpc/pseries/papr-sysparm: use u8 arrays for payloads").
64+
65+
Verified that the object code in librtas_src/sysparm.o is unchanged by
66+
this.
67+
68+
Signed-off-by: Nathan Lynch <[email protected]>
69+
Signed-off-by: Tyrel Datwyler <[email protected]>
70+
71+
commit d8d4ee6f5052704ac82bb8aa8d8fe8816dac41cd
72+
Author: Nathan Lynch <[email protected]>
73+
Date: Mon Sep 25 11:42:26 2023 -0500
74+
75+
librtas/sysparm: prefer /dev/papr-sysparm when available
76+
77+
Change rtas_get_sysparm() and rtas_set_sysparm() to prefer the
78+
/dev/papr-sysparm character device expected in Linux v6.8.
79+
80+
On the first invocation of either function, probe for the new ABI and
81+
initialize internal function pointers according to the result. Use
82+
pthread_once() to ensure that this initialization step is performed
83+
atomically and only once.
84+
85+
When /dev/papr-sysparm is available, use its PAPR_SYSPARM_IOC_GET and
86+
PAPR_SYSPARM_IOC_SET ioctl commands to retrieve and update system
87+
parameters. Most of the complexity of calling RTAS is handled
88+
internally to the kernel and the ioctl follows Linux conventions,
89+
returning 0 on success or -1 w/errno on failure. On failure,
90+
back-convert the errno to an RTAS status value that callers will
91+
recognize.
92+
93+
For now, carry a copy of the kernel uapi header.
94+
95+
Signed-off-by: Nathan Lynch <[email protected]>
96+
Signed-off-by: Tyrel Datwyler <[email protected]>
97+
98+
commit 57d5e1c07b40e56f6209e7b806208818464f8e8d
99+
Author: Nathan Lynch <[email protected]>
100+
Date: Sat Aug 12 13:27:39 2023 -0500
101+
102+
librtas/vpd: prefer /dev/papr-vpd when available
103+
104+
Change rtas_get_vpd() to prefer the /dev/papr-vpd character device
105+
expected in Linux v6.8.
106+
107+
On the first invocation of rtas_get_vpd(), probe for the new ABI and
108+
initialize an internal function pointer according to the result. Use
109+
pthread_once() to ensure that this probe step is performed atomically
110+
and only once. It would not make sense to re-probe (and potentially
111+
update the implementation) on every call, since the implementations
112+
differ in the way state for the call sequence is maintained.
113+
114+
Assuming the new ABI is available: upon first call to rtas_get_vpd(),
115+
open /dev/papr-vpd and obtain a file descriptor using the
116+
PAPR_VPD_CREATE_HANDLE ioctl() command. This file descriptor is a
117+
reference to the VPD returned from a complete ibm,get-vpd call
118+
sequence. Subsequent calls sequentially read the VPD from the fd,
119+
which is closed once EOF is reached.
120+
121+
To existing users of rtas_get_vpd(), the new implementation is
122+
indistinguishable from the old one, with one exception:
123+
124+
* When using the rtas() syscall on current systems, RTAS advances the
125+
sequence number by a fixed interval on each call in a sequence. This
126+
is visible in the values returned in the 'seq_next' out parameter.
127+
128+
* When using /dev/papr-vpd, the value returned in 'seq_next' does not
129+
change between calls; librtas treats it as a "handle" for a sequence
130+
in progress.
131+
132+
In PAPR there is no meaning attached to the value returned in the
133+
'seq_next' out parameter, and there is no requirement that it must
134+
change or increment on each call. No user should be relying on the
135+
behavior of this aspect of the interface to judge the status of a
136+
sequence.
137+
138+
I have verified that an unmodified vpdupdate command from a distro
139+
lsvpd package works correctly when linked to a librtas.so with this
140+
change. This is the primary (and perhaps only) user of rtas_get_vpd().
141+
142+
For now, carry a copy of the kernel uapi header.
143+
144+
Signed-off-by: Nathan Lynch <[email protected]>
145+
Signed-off-by: Tyrel Datwyler <[email protected]>
146+
147+
commit c914a1a701391c565203b10603ad0fbc52438bf7
148+
Author: Nathan Lynch <[email protected]>
149+
Date: Mon Sep 25 11:41:22 2023 -0500
150+
151+
librtas: vendor papr-miscdev.h
152+
153+
This is a common header used by other kernel uapi headers that we will
154+
copy into the source tree.
155+
156+
Signed-off-by: Nathan Lynch <[email protected]>
157+
Signed-off-by: Tyrel Datwyler <[email protected]>
158+
159+
commit c47176a5f1ce7bb16ba02b8c8520e02b285d7e9f
160+
Author: Nathan Lynch <[email protected]>
161+
Date: Mon Sep 25 11:32:33 2023 -0500
162+
163+
librtas: move system parameter code to separate module
164+
165+
This code will gain the ability to access system parameters using a
166+
different interface exposed by newer kernels. This will involve adding
167+
a nontrivial amount of code, so move it out of syscall_calls.c.
168+
169+
Signed-off-by: Nathan Lynch <[email protected]>
170+
Signed-off-by: Tyrel Datwyler <[email protected]>
171+
172+
commit ee06898b1e7807a6e201b281ffc8ee3fa96136f4
173+
Author: Nathan Lynch <[email protected]>
174+
Date: Sat Aug 12 12:44:38 2023 -0500
175+
176+
librtas: move VPD code into separate module
177+
178+
This code will gain the ability to retrieve VPD using a different
179+
interface exposed by newer kernels. This will be a lot of additional
180+
code, so move it out of syscall_calls.c.
181+
182+
Signed-off-by: Nathan Lynch <[email protected]>
183+
Signed-off-by: Tyrel Datwyler <[email protected]>
184+
185+
commit 569da8e5f0d5009694dc2def350cb9cd2c1d81a6
186+
Author: Nathan Lynch <[email protected]>
187+
Date: Sat Aug 12 12:41:36 2023 -0500
188+
189+
librtas: expose low-level RTAS call APIs internally
190+
191+
Make these functions available outside of syscall_calls.c, marking
192+
them hidden so that they aren't exposed in the library ABI.
193+
194+
The implementations of librtas APIs will move into separate C files as
195+
they gain support for new interfaces offered by the kernel.
196+
197+
Signed-off-by: Nathan Lynch <[email protected]>
198+
Signed-off-by: Tyrel Datwyler <[email protected]>
199+
200+
commit 0ca359b34221465dac6999ad957a41ac4f5edc92
201+
Author: Nathan Lynch <[email protected]>
202+
Date: Mon Sep 25 21:11:59 2023 -0500
203+
204+
tools: add activate-firmware-regress script
205+
206+
Add a utility that can quickly validate a development build against
207+
the activate_firmware command from powerpc-utils, which exercises the
208+
rtas_get_sysparm() API. This is a high-level test that needs superuser
209+
priveleges to run, so it's not suitable for the development test
210+
suite. (Note that despite its name, the way we invoke the command does
211+
not alter any system or firmware configuration, it only queries a
212+
system parameter.)
213+
214+
Signed-off-by: Nathan Lynch <[email protected]>
215+
Signed-off-by: Tyrel Datwyler <[email protected]>
216+
217+
commit 4c44465e6d54acdd31ac28334441468375496e4f
218+
Author: Nathan Lynch <[email protected]>
219+
Date: Thu Aug 10 13:31:10 2023 -0500
220+
221+
tools: add vpdupdate-regress script
222+
223+
Add a utility that can quickly validate a development build against
224+
vpdupdate, which exercises the rtas_get_vpd() API. This is a
225+
high-level test that needs superuser priveleges to run, so it's not
226+
suitable for the development test suite.
227+
228+
Signed-off-by: Nathan Lynch <[email protected]>
229+
Signed-off-by: Tyrel Datwyler <[email protected]>
230+
1231
Changelog for librtas-2.0.5
2232
=======================================
3233
commit 8aee694e8070be4f16db9d52556f1fd33421ed35

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([librtas],[2.0.5],[See README])
1+
AC_INIT([librtas],[2.0.6],[See README])
22
AC_PREREQ([2.69])
33
AC_CONFIG_SRCDIR([librtas_src/librtas.h])
44

0 commit comments

Comments
 (0)