kernel/1287-rhel-kabi-dpll-adaptation.patch
Andrew Lukoshko f6916a8ae1 Recreate RHEL 6.12.0-211.20.1 from CS10/upstream backports
Add the RHEL 211.19.1..211.20.1 backports (1245-1287) from centos-stream-10 and
upstream, on top of 211.18.1, plus the dpll RHEL kABI adaptation (1287). RHEL now
ships the smb cifs.spnego fix too; the existing ahead-fix 1105 is byte-identical,
so RHEL's redundant copy is omitted. Bump to 211.20.1.
2026-06-07 00:04:20 +00:00

122 lines
4.9 KiB
Diff

Subject: [PATCH] dpll: RHEL 10.2 kABI adaptation (RH_KABI_USE/REPLACE + ffo backward-compat)
# RHEL-z-stream-specific kABI wrapping of the dpll feature additions (0015/0026/0028).
# No CS10/upstream commit produces this exact kABI form; reconstructed to match RHEL.
diff --git a/drivers/dpll/dpll_netlink.c b/drivers/dpll/dpll_netlink.c
index 00e8696..edd5967 100644
--- a/drivers/dpll/dpll_netlink.c
+++ b/drivers/dpll/dpll_netlink.c
@@ -424,7 +424,13 @@ static int dpll_msg_add_ffo(struct sk_buff *msg, struct dpll_pin *pin,
struct dpll_ffo_param ffo = { .type = type };
int ret;
- if (!ops->ffo_get || !(ops->supported_ffo & BIT(type)))
+ /* RHEL: To maintain backward compatibility with older binary modules,
+ * we must accept a value of zero for .supported_ffo when the type is
+ * DPLL_FFO_PORT_RXTX_RATE.
+ */
+ if (!ops->ffo_get ||
+ !((ops->supported_ffo & BIT(type)) ||
+ (!ops->supported_ffo && type == DPLL_FFO_PORT_RXTX_RATE)))
return 0;
ret = ops->ffo_get(pin, dpll_pin_on_dpll_priv(ref->dpll, pin),
ref->dpll, dpll_priv(ref->dpll), &ffo, extack);
diff --git a/include/linux/dpll.h b/include/linux/dpll.h
index cd21b1f..d988c09 100644
--- a/include/linux/dpll.h
+++ b/include/linux/dpll.h
@@ -54,15 +54,13 @@ struct dpll_device_ops {
int (*phase_offset_avg_factor_get)(const struct dpll_device *dpll,
void *dpll_priv, u32 *factor,
struct netlink_ext_ack *extack);
- int (*freq_monitor_set)(const struct dpll_device *dpll, void *dpll_priv,
+
+ RH_KABI_USE(1, int (*freq_monitor_set)(const struct dpll_device *dpll, void *dpll_priv,
enum dpll_feature_state state,
- struct netlink_ext_ack *extack);
- int (*freq_monitor_get)(const struct dpll_device *dpll, void *dpll_priv,
+ struct netlink_ext_ack *extack))
+ RH_KABI_USE(2, int (*freq_monitor_get)(const struct dpll_device *dpll, void *dpll_priv,
enum dpll_feature_state *state,
- struct netlink_ext_ack *extack);
-
- RH_KABI_RESERVE(1)
- RH_KABI_RESERVE(2)
+ struct netlink_ext_ack *extack))
RH_KABI_RESERVE(3)
RH_KABI_RESERVE(4)
RH_KABI_RESERVE(5)
@@ -80,13 +78,16 @@ enum dpll_ffo_type {
__DPLL_FFO_TYPE_MAX,
};
+/* RHEL: we have to keep 'ffo' field to be first to preserve compatibility
+ * with older .ffo_get() callbacks that accepts 's64 *' as parameter instead
+ * of 'struct dpll_ffo_param *'
+ */
struct dpll_ffo_param {
- enum dpll_ffo_type type;
s64 ffo;
+ enum dpll_ffo_type type;
};
struct dpll_pin_ops {
- unsigned long supported_ffo;
int (*frequency_set)(const struct dpll_pin *pin, void *pin_priv,
const struct dpll_device *dpll, void *dpll_priv,
const u64 frequency,
@@ -111,12 +112,6 @@ struct dpll_pin_ops {
const struct dpll_device *dpll,
void *dpll_priv, enum dpll_pin_state *state,
struct netlink_ext_ack *extack);
- int (*operstate_on_dpll_get)(const struct dpll_pin *pin,
- void *pin_priv,
- const struct dpll_device *dpll,
- void *dpll_priv,
- enum dpll_pin_operstate *operstate,
- struct netlink_ext_ack *extack);
int (*state_on_pin_set)(const struct dpll_pin *pin, void *pin_priv,
const struct dpll_pin *parent_pin,
void *parent_pin_priv,
@@ -145,14 +140,13 @@ struct dpll_pin_ops {
const struct dpll_device *dpll, void *dpll_priv,
const s32 phase_adjust,
struct netlink_ext_ack *extack);
- int (*ffo_get)(const struct dpll_pin *pin, void *pin_priv,
+ RH_KABI_REPLACE(int (*ffo_get)(const struct dpll_pin *pin, void *pin_priv,
+ const struct dpll_device *dpll, void *dpll_priv,
+ s64 *ffo, struct netlink_ext_ack *extack),
+ int (*ffo_get)(const struct dpll_pin *pin, void *pin_priv,
const struct dpll_device *dpll, void *dpll_priv,
struct dpll_ffo_param *ffo,
- struct netlink_ext_ack *extack);
- int (*measured_freq_get)(const struct dpll_pin *pin, void *pin_priv,
- const struct dpll_device *dpll,
- void *dpll_priv, u64 *measured_freq,
- struct netlink_ext_ack *extack);
+ struct netlink_ext_ack *extack))
int (*esync_set)(const struct dpll_pin *pin, void *pin_priv,
const struct dpll_device *dpll, void *dpll_priv,
u64 freq, struct netlink_ext_ack *extack);
@@ -171,9 +165,17 @@ struct dpll_pin_ops {
enum dpll_pin_state *state,
struct netlink_ext_ack *extack);
- RH_KABI_RESERVE(1)
- RH_KABI_RESERVE(2)
- RH_KABI_RESERVE(3)
+ RH_KABI_USE(1, int (*measured_freq_get)(const struct dpll_pin *pin, void *pin_priv,
+ const struct dpll_device *dpll,
+ void *dpll_priv, u64 *measured_freq,
+ struct netlink_ext_ack *extack))
+ RH_KABI_USE(2, int (*operstate_on_dpll_get)(const struct dpll_pin *pin,
+ void *pin_priv,
+ const struct dpll_device *dpll,
+ void *dpll_priv,
+ enum dpll_pin_operstate *operstate,
+ struct netlink_ext_ack *extack))
+ RH_KABI_USE(3, unsigned long supported_ffo)
RH_KABI_RESERVE(4)
RH_KABI_RESERVE(5)
RH_KABI_RESERVE(6)