Page MenuHomeFreeBSD

linuxkpi: Update `struct irq_work`
ClosedPublic

Authored by dumbbell on Oct 12 2022, 7:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 4:57 AM
Unknown Object (File)
Oct 3 2024, 3:28 PM
Unknown Object (File)
Oct 1 2024, 2:10 PM
Unknown Object (File)
Sep 30 2024, 5:31 PM
Unknown Object (File)
Sep 27 2024, 5:45 PM
Unknown Object (File)
Sep 27 2024, 5:22 PM
Unknown Object (File)
Sep 27 2024, 5:21 PM
Unknown Object (File)
Sep 27 2024, 5:21 PM

Details

Summary

The previous llnode field is moved inside another field node.

This node field is a struct __call_single_node in Linux. Here, we
simply add an anonymous struct with the llnode field inside. That
field's new name is llist now.

struct irq_work was changed in an incompatible way. I'm thinking of adding a
#define beside the new structure so that drivers can check it to determine
how to use it, and thus have a single code base working with multiple versions
of FreeBSD. What do you think?

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47803
Build 44690: arc lint + arc unit

Event Timeline

struct irq_work was changed in an incompatible way. I'm thinking of adding a #define beside the new structure so that drivers can check it to determine how to use it, and thus have a single code base working with multiple versions of FreeBSD. What do you think?

Anonymous union of struct node and struct llnode?

I think something like this will work. It's not pretty but kills compilation breakage.

union {
	struct llist_node llnode;
	struct {
		struct llist_node llist;
	} node;
};

Good idea @wulf and @hselasky! I just updated the patch.

This revision is now accepted and ready to land.Nov 5 2022, 5:20 PM
This revision was automatically updated to reflect the committed changes.