Skip to content

[Deepin-Kernel-SIG] [linux 6.6.y] [Deepin] Revert KABI fix changes.#1501

Merged
opsiff merged 6 commits intodeepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-2026-02-10-kabi
Feb 11, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.6.y] [Deepin] Revert KABI fix changes.#1501
opsiff merged 6 commits intodeepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-2026-02-10-kabi

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Feb 10, 2026

We release new kabi version, revert them.

Summary by Sourcery

Revert previous Deepin KABI-related extensions and allocations, restoring in-tree kernel interfaces and structures for perf events, firmware nodes, IPv6 FIB GC, GRO handling, BPF map owner, and netpoll to their upstream layouts.

Bug Fixes:

  • Restore use of core hw_perf_event fields for ACR configuration and dynamic constraints in the Intel x86 perf subsystem.

Enhancements:

  • Remove auxiliary hw_perf_event_ext allocation and related slab cache, simplifying perf event lifetime management.
  • Reinstate direct function pointer and struct members in fwnode_operations, fib6_info, fib6_table, bpf_map_owner, and netpoll instead of Deepin KABI macros, aligning with upstream kernels.

deepin inclusion
category: kabi

This reverts commit 19a90fb.
We release new kabi version, revert it.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: kabi

This reverts commit ebe57af.
We release new kabi version, revert it.

Link: deepin-community#1379
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
… list of routes"

deepin inclusion
category: kabi

This reverts commit 3427f09.
We release new kabi version, revert it.

Link: deepin-community#1452
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: kabi

This reverts commit 6cdefbb.
We release new kabi version, revert it.

Link: deepin-community#1367
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusin
category: kabi

This reverts commit 527ec89.
We release new kabi version, revert it.

Link: deepin-community#1378
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
deepin inclusion
category: kabi

This reverts commit 3ab9823.
We release new kabi version, revert it.

Link: deepin-community#1368
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@sourcery-ai
Copy link

sourcery-ai bot commented Feb 10, 2026

Reviewer's Guide

This PR reverts Deepin-specific KABI indirections by inlining previously externalized fields back into core kernel structs and removing separate allocations, primarily in perf, fwnode, IPv6 FIB, BPF, netpoll, and skbuff paths, restoring upstream-style layouts and behavior while keeping Deepin KABI reserve hooks in place.

Updated class diagram for perf event hardware structs

classDiagram

class perf_event {
  +hw_perf_event hw
  +__u32 orig_type
  +void *filter
  +DEEPIN_KABI_RESERVE_1
  +DEEPIN_KABI_RESERVE_2
  +DEEPIN_KABI_RESERVE_3
  +DEEPIN_KABI_RESERVE_4
}

class hw_perf_event {
  +u64 config
  +u64 config1
  +u64 last_tag
  +u64 dyn_constraint
  +unsigned long config_base
  +unsigned long event_base
  +int event_base_rdpmc
  +int idx
  +int last_cpu
  +u64 sample_period
  +u64 period_left
  +u64 interrupts
  +u64 freq_time_stamp
  +u64 freq_count
  +u64 freq
  +u64 branch_reg
  +unsigned int flags
}

class hw_perf_event_extra {
  +u64 config
  +u64 reg
  +int idx
}

class hw_perf_event_extra_reg {
  +u64 config
  +int idx
}

class cpu_hw_events {
  +int n_events
  +perf_event *event_list
  +int *assign
  +bool excl_cntrs
}

class perf_event_attr {
  +u64 config
  +u64 config1
  +u64 config2
}

perf_event *-- hw_perf_event : has
hw_perf_event o-- hw_perf_event_extra : extra_reg
hw_perf_event o-- hw_perf_event_extra_reg : branch_reg
cpu_hw_events o-- perf_event : event_list
perf_event --> perf_event_attr : attr
Loading

Updated class diagram for fwnode, IPv6 FIB, BPF and netpoll structs

classDiagram

class fwnode_handle {
  +const fwnode_operations *ops
}

class fwnode_operations {
  +void *get
  +void put
  +bool property_present
  +int property_read_u8_array
  +int property_read_u16_array
  +int property_read_u32_array
  +int property_read_u64_array
  +int property_read_string_array
  +int add_links
  +void __iomem *iomap
  +int irq_get
  +int property_count_reference_with_args
  +DEEPIN_KABI_RESERVE_1
  +DEEPIN_KABI_RESERVE_2
  +DEEPIN_KABI_RESERVE_3
  +DEEPIN_KABI_RESERVE_4
}

fwnode_handle --> fwnode_operations : uses

class fib6_info {
  +refcount_t fib6_ref
  +unsigned long expires
  +hlist_node gc_link
  +dst_metrics *fib6_metrics
  +fib6_table *fib6_table
  +fib6_nh *fib6_nh
  +rcu_head rcu
  +nexthop *nh
  +DEEPIN_KABI_RESERVE_1
  +DEEPIN_KABI_RESERVE_2
}

class fib6_table {
  +u32 tb6_id
  +struct hlist_head tb6_gc_hlist
  +inet_peer_base tb6_peers
  +unsigned int flags
  +unsigned int fib_seq
}

class dst_metrics {
  +u32 metrics[ ]
}

class fib6_nh {
  +int dummy
}

class nexthop {
  +int dummy
}

fib6_info --> fib6_table : belongs_to
fib6_info o-- dst_metrics : metrics
fib6_info o-- fib6_nh : fib6_nh[]
fib6_info --> nexthop : nh
fib6_table o-- fib6_info : routes

class bpf_map_owner {
  +bool xdp_has_frags
  +u64 storage_cookie[MAX_BPF_CGROUP_STORAGE_TYPE]
  +const btf_type *attach_func_proto
  +enum bpf_attach_type expected_attach_type
}

class btf_type {
  +u32 info
}

bpf_map_owner --> btf_type : uses

class netpoll {
  +char name[16]
  +net_device *dev
  +u8 local_mac[ETH_ALEN]
  +u8 remote_mac[ETH_ALEN]
  +__be32 local_ip
  +__be32 remote_ip
  +__be16 local_port
  +__be16 remote_port
  +bool ipv6
  +sk_buff_head skb_pool
  +DEEPIN_KABI_RESERVE_1
  +DEEPIN_KABI_RESERVE_2
}

class net_device {
  +char name[16]
}

class sk_buff_head {
  +sk_buff *next
  +sk_buff *prev
  +u32 qlen
}

netpoll --> net_device : uses
netpoll o-- sk_buff_head : skb_pool
Loading

File-Level Changes

Change Details Files
Collapse perf hw_ext indirection back into hw_perf_event and remove its separate allocation/cache.
  • Remove hw_perf_event_ext struct definition and kmem cache, and fold config1 and dyn_constraint directly into hw_perf_event.
  • Update all perf/intel PMU ACR and constraint handling code to access hw.config1 and hw.dyn_constraint instead of hw_ext fields.
  • Remove per-event allocation/free of hw_ext in perf_event_alloc and free_event_rcu, and initialize dyn_constraint in __x86_pmu_event_init via hw rather than hw_ext.
  • Change perf_event struct to use a DEEPIN_KABI_RESERVE slot instead of a hw_ext pointer to preserve KABI reserve space.
include/linux/perf_event.h
kernel/events/core.c
arch/x86/events/intel/core.c
arch/x86/events/core.c
Revert Deepin KABI wrappers on fwnode operations and IPv6 FIB GC structures to direct fields.
  • Change fwnode_operations to expose property_count_reference_with_args directly and move the corresponding slot back to DEEPIN_KABI_RESERVE(1).
  • Make fib6_info.gc_link a direct struct member and convert the previous KABI-extended gc_link field back to DEEPIN_KABI_RESERVE slots.
  • Turn fib6_table.tb6_gc_hlist from DEEPIN_KABI_EXTEND into a plain struct member, restoring the original table GC list field.
include/linux/fwnode.h
include/net/ip6_fib.h
Remove Deepin-specific KABI-based GRO header override and restore standard include path.
  • Delete the CONFIG_DEEPIN_KABI_RESERVE conditional GRO_MAX_HEAD definition and rely again on the normal <net/gro.h> header with default sizing.
net/core/skbuff.c
Inline previously KABI-extended fields for BPF map owner and netpoll.
  • Change bpf_map_owner.expected_attach_type from DEEPIN_KABI_EXTEND to a normal enum field.
  • Move netpoll.skb_pool from a DEEPIN_KABI_EXTEND field into a regular struct member, leaving DEEPIN_KABI_RESERVE slots untouched.
include/linux/bpf.h
include/linux/netpoll.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts prior Deepin kABI-specific struct extensions/aux allocations to bring multiple core kernel interfaces back in line with upstream Linux 6.6.y layouts and lifetime management (notably perf events and several networking-related structs).

Changes:

  • Remove hw_perf_event_ext allocation/caching and fold required fields back into struct hw_perf_event.
  • Restore upstream-like struct members for fwnode ops, IPv6 FIB GC tracking, netpoll skb pool handling, and BPF map owner state (replacing Deepin KABI macros/extends).
  • Update x86 perf (Intel PMU + generic x86) to use the restored in-struct perf hardware fields.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
net/core/skbuff.c Removes Deepin KABI conditional include/define and relies on upstream GRO header definition.
kernel/events/core.c Drops perf_hw_event_cache and per-event hw_ext allocation/free paths.
include/net/ip6_fib.h Restores IPv6 FIB GC fields (gc_link, tb6_gc_hlist) to upstream-style members.
include/linux/perf_event.h Removes hw_perf_event_ext and adds config1/dyn_constraint into struct hw_perf_event; removes perf_event’s hw_ext pointer.
include/linux/netpoll.h Moves skb_pool into the main struct netpoll layout as an in-tree member.
include/linux/fwnode.h Restores property_count_reference_with_args as a direct function pointer member.
include/linux/bpf.h Restores expected_attach_type as a direct member of struct bpf_map_owner.
arch/x86/events/intel/core.c Switches Intel PMU ACR/dynamic constraint logic to use event->hw.* fields.
arch/x86/events/core.c Initializes event->hw.dyn_constraint directly (no hw_ext).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +174 to 179
int (*property_count_reference_with_args)(
const struct fwnode_handle *fwnode, const char *list_name,
const char *cells_name))
const char *cells_name);

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct fwnode_operations: replacing DEEPIN_KABI_USE(1, ...) with a direct function pointer plus DEEPIN_KABI_RESERVE(1) means that when CONFIG_DEEPIN_KABI_RESERVE is enabled the struct grows by an extra unsigned long slot (the reserve is no longer being “used”/replaced). If the intent is to keep the reserved-space model (per include/linux/deepin_kabi.h docs for RESERVE/USE), consider switching back to DEEPIN_KABI_USE(1, ...) or dropping DEEPIN_KABI_RESERVE(1) here so the added member occupies the reserved space rather than appending new padding.

Copilot uses AI. Check for mistakes.
Comment on lines +216 to +217
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct fib6_info: now that gc_link is a real field, leaving DEEPIN_KABI_RESERVE(1)/(2) in place means that with CONFIG_DEEPIN_KABI_RESERVE enabled the struct grows (the reserves are no longer being consumed via DEEPIN_KABI_USE). If the goal is still to use reserved slots as intended (see include/linux/deepin_kabi.h RESERVE/USE docs), consider either using DEEPIN_KABI_USE(1, 2, struct hlist_node gc_link) at the desired location or removing these reserves if they’re no longer needed for ABI management.

Copilot uses AI. Check for mistakes.
Copy link
Member

@Cryolitia Cryolitia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Cryolitia
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff opsiff merged commit 702814c into deepin-community:linux-6.6.y Feb 11, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants