Skip to content

Commit 93a1507

Browse files
committed
Merge: CNB97: dpll: add kabi padding
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/4434 JIRA: https://issues.redhat.com/browse/RHEL-111904 Structures dpll_device_ops and dpll_pin_ops are protected by kABI, add reserved fields to them to make them extensible. Also add comments to dpll_device and dpll_pin structure we can freely modify them. Signed-off-by: Ivan Vecera <[email protected]> Closes RHEL-111904 Approved-by: Petr Oros <[email protected]> Approved-by: Michal Schmidt <[email protected]> Approved-by: CKI KWF Bot <[email protected]> Merged-by: Augusto Caringi <[email protected]>
2 parents ba63f9f + d9ce8f0 commit 93a1507

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

drivers/dpll/dpll_core.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
* @pin_refs: stores pins registered within a dpll
2525
* @refcount: refcount
2626
* @registration_list: list of registered ops and priv data of dpll owners
27+
*
28+
* RHEL: The content of the structure is invisible for modules and also
29+
* all its instances are allocated by DPLL core so it is safe to modify this
30+
* structure but RH_KABI_EXTEND macro has to be used to avoid kABI checker
31+
* errors.
2732
**/
2833
struct dpll_device {
2934
u32 id;
@@ -48,6 +53,11 @@ struct dpll_device {
4853
* @rclk_dev_name: holds name of device when pin can recover clock from it
4954
* @refcount: refcount
5055
* @rcu: rcu_head for kfree_rcu()
56+
*
57+
* RHEL: The content of the structure is invisible for modules and also
58+
* all its instances are allocated by DPLL core so it is safe to modify this
59+
* structure but RH_KABI_EXTEND macro has to be used to avoid kABI checker
60+
* errors.
5161
**/
5262
struct dpll_pin {
5363
u32 id;

include/linux/dpll.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <linux/netdevice.h>
1414
#include <linux/rtnetlink.h>
1515

16+
#include <linux/rh_kabi.h>
17+
1618
struct dpll_device;
1719
struct dpll_pin;
1820
struct dpll_pin_esync;
@@ -38,6 +40,17 @@ struct dpll_device_ops {
3840
void *dpll_priv,
3941
enum dpll_feature_state *state,
4042
struct netlink_ext_ack *extack);
43+
44+
RH_KABI_RESERVE(1)
45+
RH_KABI_RESERVE(2)
46+
RH_KABI_RESERVE(3)
47+
RH_KABI_RESERVE(4)
48+
RH_KABI_RESERVE(5)
49+
RH_KABI_RESERVE(6)
50+
RH_KABI_RESERVE(7)
51+
RH_KABI_RESERVE(8)
52+
RH_KABI_RESERVE(9)
53+
RH_KABI_RESERVE(10)
4154
};
4255

4356
struct dpll_pin_ops {
@@ -103,6 +116,23 @@ struct dpll_pin_ops {
103116
const struct dpll_device *dpll, void *dpll_priv,
104117
struct dpll_pin_esync *esync,
105118
struct netlink_ext_ack *extack);
119+
120+
RH_KABI_RESERVE(1)
121+
RH_KABI_RESERVE(2)
122+
RH_KABI_RESERVE(3)
123+
RH_KABI_RESERVE(4)
124+
RH_KABI_RESERVE(5)
125+
RH_KABI_RESERVE(6)
126+
RH_KABI_RESERVE(7)
127+
RH_KABI_RESERVE(8)
128+
RH_KABI_RESERVE(9)
129+
RH_KABI_RESERVE(10)
130+
RH_KABI_RESERVE(11)
131+
RH_KABI_RESERVE(12)
132+
RH_KABI_RESERVE(13)
133+
RH_KABI_RESERVE(14)
134+
RH_KABI_RESERVE(15)
135+
RH_KABI_RESERVE(16)
106136
};
107137

108138
struct dpll_pin_frequency {

0 commit comments

Comments
 (0)