-
Notifications
You must be signed in to change notification settings - Fork 29
backport: Enable mei drivers backport support #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
knayana-gse
wants to merge
10
commits into
intel-gpu:oot-backport/v7.0
Choose a base branch
from
knayana-gse:mei-bp-7.0-jun25
base: oot-backport/v7.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
75e93d4
backport: Enable mei drivers backport support
knayana-gse 556e062
Add i915_hdcp_interface.h and i915_pxp_tee_interface.h files
knayana-gse b7557aa
mei: bus: fix match callback const argument compatibility
knayana-gse f5cbefc
mei: trace: Make code compatible for older assign_str arguments
knayana-gse f6cedf5
mei: add linux/unaligned.h backport header
knayana-gse b37508b
mei: handle platform remove callback change
knayana-gse 68375c8
mei: Use compatible MODULE_IMPORT_NS form for VSC_TP.
knayana-gse 37f0ba2
Enable DKMS deb package support for mei driver
knayana-gse c972456
Add 7.1 kernel mei changes
knayana-gse 9c58b64
Enable DKMS rpm package support for mei driver
knayana-gse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| dnl # | ||
| dnl # v6.11-d69d80484598 | ||
| dnl # driver core: have match() callback in struct bus_type take a const * | ||
| dnl # | ||
| AC_DEFUN([AC_MEI_CL_DEVICE_MATCH_CONST_ARG_NOT_PRESENT], [ | ||
| AC_KERNEL_DO_BACKGROUND([ | ||
| AC_KERNEL_TRY_COMPILE([ | ||
| #include <linux/device.h> | ||
| #include <linux/device/bus.h> | ||
| ],[ | ||
| int mei_cl_device_match(struct device *dev, | ||
| const struct device_driver *drv); | ||
| struct bus_type test_bus = { | ||
| .match = mei_cl_device_match, | ||
| }; | ||
| (void)test_bus; | ||
| ],[ | ||
| ],[ | ||
| AC_DEFINE([BPM_MEI_CL_DEVICE_MATCH_CONST_ARG_NOT_PRESENT], 1, | ||
| [const argument not supported in struct bus_type match callback]) | ||
| ]) | ||
| ]) | ||
| ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| dnl # | ||
| dnl # v6.11-0edb555a65d1 | ||
| dnl # platform: Make platform_driver::remove() return void | ||
| dnl # | ||
| AC_DEFUN([AC_PF_DRIVER_REMOVE_RETURN_VOID_NOT_PRESENT], [ | ||
| AC_KERNEL_DO_BACKGROUND([ | ||
| AC_KERNEL_TRY_COMPILE([ | ||
| #include <linux/platform_device.h> | ||
| ],[ | ||
| void remove_cb(struct platform_device *pdev); | ||
| struct platform_driver pdrv = { .remove = remove_cb }; | ||
| (void)pdrv; | ||
| ],[ | ||
| ],[ | ||
| AC_DEFINE([BPM_PF_DRIVER_REMOVE_RETURN_VOID_NOT_PRESENT], 1, | ||
| [platform_device.remove callback returns int]) | ||
| ]) | ||
| ]) | ||
| ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #ifndef __BACKPORT_LINUX_UNALIGNED_H | ||
| #define __BACKPORT_LINUX_UNALIGNED_H | ||
|
|
||
| #include <backport/backport_auto.h> | ||
|
|
||
| #ifndef HAVE_LINUX_UNALIGNED_H | ||
| #include <asm/unaligned.h> | ||
| #else | ||
| #include_next <linux/unaligned.h> | ||
| #endif | ||
|
|
||
| #endif /* __BACKPORT_LINUX_UNALIGNED_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
patches/0001-mei-bus-fix-match-callback-const-argument-compatibil.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
| From: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com> | ||
| Date: Mon, 29 Jun 2026 18:13:32 +0530 | ||
| Subject: mei: bus: fix match callback const argument compatibility | ||
|
|
||
| When compiling mei bus driver for kernel 6.6, the mei_cl_device_match() | ||
| function signature is incompatible with newer kernels (6.11+) where | ||
| struct bus_type.match requires const struct device_driver *. | ||
| This causes a compilation error on kernel 6.11+. | ||
|
|
||
| Add conditional compilation to support both older kernels (6.6-6.10) | ||
| with non-const parameter and newer kernels (6.11+) with const parameter. | ||
|
|
||
| Signed-off-by: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com> | ||
| --- | ||
| drivers/misc/mei/bus.c | 4 ++++ | ||
| 1 file changed, 4 insertions(+) | ||
|
|
||
| diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c | ||
| index f739dbc..34406ae 100644 | ||
| --- a/drivers/misc/mei/bus.c | ||
| +++ b/drivers/misc/mei/bus.c | ||
| @@ -1085,7 +1085,11 @@ struct mei_cl_device_id *mei_cl_device_find(const struct mei_cl_device *cldev, | ||
| * | ||
| * Return: 1 if matching device was found 0 otherwise | ||
| */ | ||
| +#ifdef BPM_MEI_CL_DEVICE_MATCH_CONST_ARG_NOT_PRESENT | ||
| +static int mei_cl_device_match(struct device *dev, struct device_driver *drv) | ||
| +#else | ||
| static int mei_cl_device_match(struct device *dev, const struct device_driver *drv) | ||
| +#endif | ||
| { | ||
| const struct mei_cl_device *cldev = to_mei_cl_device(dev); | ||
| const struct mei_cl_driver *cldrv = to_mei_cl_driver(drv); | ||
| -- | ||
| 2.43.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be part of previous commit