Skip to contentSkip to conversation

mei: make hdcp and pxp depend on X86 && PCI

PATCH In review [email protected] 4 participants 11 messages Apr 23, 2023 – Apr 30, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mei: make hdcp and pxp depend on X86 && PCI

From: Adam Borowski <[email protected]>

All other MEI configs do so already. This fixes a Kconfig gripe if I915 gets ported to other archs (such as RISC-V in Intel Horse Creek...).

---
 drivers/misc/mei/hdcp/Kconfig | 1 +
 drivers/misc/mei/pxp/Kconfig  | 1 +
 2 files changed, 2 insertions(+)
drivers/misc/mei/hdcp/Kconfig +1 -0
index 54e1c9526909..83e67771ac6b 100644
@@ -4,6 +4,7 @@
 config INTEL_MEI_HDCP
 	tristate "Intel HDCP2.2 services of ME Interface"
 	select INTEL_MEI_ME
+	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  MEI Support for HDCP2.2 Services on Intel platforms.
drivers/misc/mei/pxp/Kconfig +1 -0
index 4029b96afc04..95f2c2470d28 100644
@@ -5,6 +5,7 @@
 config INTEL_MEI_PXP
 	tristate "Intel PXP services of ME Interface"
 	select INTEL_MEI_ME
+	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  MEI Support for PXP Services on Intel platforms.
Signature · 1 line
2.40.0
#1 lore raw

What is the exact issue you are experiencing, can you add the error message this fixes?

Quoted 38 lines

From: Adam Borowski <[email protected]>

All other MEI configs do so already. This fixes a Kconfig gripe if I915 gets ported to other archs (such as RISC-V in Intel Horse Creek...).

---
 drivers/misc/mei/hdcp/Kconfig | 1 +
 drivers/misc/mei/pxp/Kconfig  | 1 +
 2 files changed, 2 insertions(+)
drivers/misc/mei/hdcp/Kconfig +1 -0
index 54e1c9526909..83e67771ac6b 100644
@@ -4,6 +4,7 @@
 config INTEL_MEI_HDCP
 	tristate "Intel HDCP2.2 services of ME Interface"
 	select INTEL_MEI_ME
+	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  MEI Support for HDCP2.2 Services on Intel platforms.
drivers/misc/mei/pxp/Kconfig +1 -1
index 4029b96afc04..95f2c2470d28 100644
@@ -5,6 +5,7 @@
 config INTEL_MEI_PXP
 	tristate "Intel PXP services of ME Interface"
 	select INTEL_MEI_ME
+	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  MEI Support for PXP Services on Intel platforms.
--

2.40.0

#2 lore raw
Quoted 1 line · Tomas

What is the exact issue you are experiencing, can you add the error message this fixes?

The problem doesn't trigger in mainline, as DRM_I915 can't be enabled on !X86; https://github.com/kilobyte/linux branch i915 has a WIP port. Some unrelated piece (I suspect ACPI changes, didn't bother to investigate) has in the meantime grown enough bits to enable prerequsites that trigger:

WARNING: unmet direct dependencies detected for INTEL_MEI_ME
Depends on [n]: X86 && PCI [=y]
Selected by [y]:
- INTEL_MEI_HDCP [=y] && DRM_I915 [=y]
- INTEL_MEI_PXP [=y] && DRM_I915 [=y]

This doesn't cause an actual build failure, as drivers/misc/Makefile has

Quoted 1 line

obj-$(CONFIG_INTEL_MEI) += mei/

which won't try to build mei/hdcp nor mei/pxp despite them being enabled in the config.

Of all the settings in drivers/misc/mei/Kconfig, only these two (that reside in their own subdirectories) lack this stanza. You'd want to deduplicate the selects one day -- but alas, "select" relations are not as straightforward as "depends", thus I only did the same as for all other settings in drivers/misc/mei/Kconfig.

Should I quote this warning in full in the commit message? I thought that "make ... depend on ..." already explains enough.

Also, as this lack of dependency is an obvious and self-contained change, I decided to submit it directly via mei, rather than ask for an ACK then spam you with every iteration of the patchset. Should it go via drm/i915 instead?

(I'd also like to apologize for sitting on this patchset so long, my brain's firmware is faulty :/ ).

Quoted 29 lines
Quoted 29 lines

From: Adam Borowski <[email protected]>

All other MEI configs do so already. This fixes a Kconfig gripe if I915 gets ported to other archs (such as RISC-V in Intel Horse Creek...).

---
 drivers/misc/mei/hdcp/Kconfig | 1 +
 drivers/misc/mei/pxp/Kconfig  | 1 +
 2 files changed, 2 insertions(+)
drivers/misc/mei/hdcp/Kconfig +1 -0
index 54e1c9526909..83e67771ac6b 100644
@@ -4,6 +4,7 @@
 config INTEL_MEI_HDCP
 	tristate "Intel HDCP2.2 services of ME Interface"
 	select INTEL_MEI_ME
+	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  MEI Support for HDCP2.2 Services on Intel platforms.
drivers/misc/mei/pxp/Kconfig +0 -0
index 4029b96afc04..95f2c2470d28 100644
@@ -5,6 +5,7 @@
 config INTEL_MEI_PXP
Quoted 8 lines
Quoted 8 lines
drivers/misc/mei/pxp/Kconfig +1 -1
 	tristate "Intel PXP services of ME Interface"
 	select INTEL_MEI_ME
+	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  MEI Support for PXP Services on Intel platforms.
--

2.40.0

Meow!

Signature · 4 lines
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Q: Is it ok to combine wired, wifi, and/or bluetooth connections
⢿⡄⠘⠷⠚⠋⠀    in wearable computing?
⠈⠳⣄⠀⠀⠀⠀ A: No, that would be mixed fabric, which Lev19:19 forbids.
#3 lore raw
Quoted 4 lines · Adam Borowski
Quoted 1 line · Tomas

What is the exact issue you are experiencing, can you add the error message this fixes?

The problem doesn't trigger in mainline

Then it's nothing we need to worry about in mainline. If/when other changes ever happen to need it here in mainline, we will gladly take the change.

For obvious reasons, we can't take patches for issues outside of our codebase. Nor do you want us to, as that way lies madness and an unmaintainable mess.

thanks,

greg k-h

#4 lore raw
Quoted 6 lines · Greg Kroah-Hartman
Quoted 4 lines · Adam Borowski
Quoted 1 line · Tomas

What is the exact issue you are experiencing, can you add the error message this fixes?

The problem doesn't trigger in mainline

Quoted 7 lines

Then it's nothing we need to worry about in mainline. If/when other changes ever happen to need it here in mainline, we will gladly take the change.

For obvious reasons, we can't take patches for issues outside of our codebase. Nor do you want us to, as that way lies madness and an unmaintainable mess.

The problem in mainline is inconsistency: out of 6 config items, 4 repeat the "depends on X86 && PCI" line, the other 2 do not. There's indeed no immediate functional issue, but I'd argue that a dormant bug is still a bug.

So we can fix the cosmetic (currently) issue on its own, or as part of the large patchset -- the latter having a side effect of stuffing your mailboxes more than needed (neither Greg, Arnd, nor Tomas are involved in other bits).

But do the selects really require so much duplication? Perhaps I'm trying to fix the underlying issue wrong?

Meow!

Signature · 4 lines
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Only flat-earthers have a problem folding a fitted sheet.
⢿⡄⠘⠷⠚⠋⠀ I instead shape it into a ball.
⠈⠳⣄⠀⠀⠀⠀
#5 lore raw

PATCH v2 1/1 mei: deduplicate X86 && PCI dependencies, make them apply to all subentries

From: Adam Borowski <[email protected]>

The Kconfig "depends on X86 && PCI" line was repeated for 4 out of 6 config symbols here -- which was both unnecessarily repetitive, and caused a dormant problem for the two remaining symbols lacking the dependency.

---
v2: instead of adding new depends, wrap all of mei in "if..endif"

 drivers/misc/mei/Kconfig | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/misc/mei/Kconfig +2 -4
index d21486d69df2..f2ab2696fa78 100644
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
+if X86 && PCI
 config INTEL_MEI
 	tristate "Intel Management Engine Interface"
-	depends on X86 && PCI
 	help
 	  The Intel Management Engine (Intel ME) provides Manageability,
 	  Security and Media services for system containing Intel chipsets.
@@ -14,7 +14,6 @@ config INTEL_MEI
 config INTEL_MEI_ME
 	tristate "ME Enabled Intel Chipsets"
 	select INTEL_MEI
-	depends on X86 && PCI
 	help
 	  MEI support for ME Enabled Intel chipsets.
 
@@ -39,7 +38,6 @@ config INTEL_MEI_ME
 config INTEL_MEI_TXE
 	tristate "Intel Trusted Execution Environment with ME Interface"
 	select INTEL_MEI
-	depends on X86 && PCI
 	help
 	  MEI Support for Trusted Execution Environment device on Intel SoCs
 
@@ -50,7 +48,6 @@ config INTEL_MEI_GSC
 	tristate "Intel MEI GSC embedded device"
 	depends on INTEL_MEI
 	depends on INTEL_MEI_ME
-	depends on X86 && PCI
 	depends on DRM_I915
 	help
 	  Intel auxiliary driver for GSC devices embedded in Intel graphics devices.
@@ -63,3 +60,4 @@ config INTEL_MEI_GSC
 source "drivers/misc/mei/hdcp/Kconfig"
 source "drivers/misc/mei/pxp/Kconfig"
 
+endif
Signature · 1 line
2.40.0
#6 lore raw

Re: [PATCH v2] mei: deduplicate X86 && PCI dependencies, make them apply to all subentries

Quoted 18 lines · On Tue, Apr 25, 2023 at 05:43:14PM +0200, [email protected] wrote:

From: Adam Borowski <[email protected]>

The Kconfig "depends on X86 && PCI" line was repeated for 4 out of 6 config symbols here -- which was both unnecessarily repetitive, and caused a dormant problem for the two remaining symbols lacking the dependency.

---
v2: instead of adding new depends, wrap all of mei in "if..endif"

 drivers/misc/mei/Kconfig | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/misc/mei/Kconfig +0 -0
index d21486d69df2..f2ab2696fa78 100644

drivers/misc/mei/Kconfig line 3

Quoted 3 lines
drivers/misc/mei/Kconfig +1 -0
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
+if X86 && PCI

Please no, that's not a normal Kconfig thing to do at all, sorry.

greg k-h

maintainer
#7 lore raw
In reply to Adam Borowski
Quoted 19 lines · Adam Borowski
Quoted 6 lines · Greg Kroah-Hartman
Quoted 4 lines · Adam Borowski
Quoted 1 line · Tomas

What is the exact issue you are experiencing, can you add the error message this fixes?

The problem doesn't trigger in mainline

Quoted 7 lines

Then it's nothing we need to worry about in mainline. If/when other changes ever happen to need it here in mainline, we will gladly take the change.

For obvious reasons, we can't take patches for issues outside of our codebase. Nor do you want us to, as that way lies madness and an unmaintainable mess.

The problem in mainline is inconsistency: out of 6 config items, 4 repeat the "depends on X86 && PCI" line, the other 2 do not. There's indeed no immediate functional issue, but I'd argue that a dormant bug is still a bug.

Quoted 6 lines

So we can fix the cosmetic (currently) issue on its own, or as part of the large patchset -- the latter having a side effect of stuffing your mailboxes more than needed (neither Greg, Arnd, nor Tomas are involved in other bits).

But do the selects really require so much duplication? Perhaps I'm trying to fix the underlying issue wrong?

I think something along these lines would do (untested):

drivers/misc/mei/Kconfig +2 -7
index d21486d69df2..8e5d79cff80b 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
-config INTEL_MEI
+menuconfig INTEL_MEI
        tristate "Intel Management Engine Interface"
        depends on X86 && PCI
        help
@@ -13,8 +13,6 @@ config INTEL_MEI
 
 config INTEL_MEI_ME
        tristate "ME Enabled Intel Chipsets"
-       select INTEL_MEI
-       depends on X86 && PCI
        help
          MEI support for ME Enabled Intel chipsets.
 
@@ -38,8 +36,6 @@ config INTEL_MEI_ME
 
 config INTEL_MEI_TXE
        tristate "Intel Trusted Execution Environment with ME Interface"
-       select INTEL_MEI
-       depends on X86 && PCI
        help
          MEI Support for Trusted Execution Environment device on Intel SoCs
 
@@ -48,9 +44,7 @@ config INTEL_MEI_TXE
 
 config INTEL_MEI_GSC
        tristate "Intel MEI GSC embedded device"
-       depends on INTEL_MEI
        depends on INTEL_MEI_ME
-       depends on X86 && PCI
        depends on DRM_I915
        help
          Intel auxiliary driver for GSC devices embedded in Intel graphics devices.
@@ -63,3 +57,4 @@ config INTEL_MEI_GSC
 source "drivers/misc/mei/hdcp/Kconfig"
 source "drivers/misc/mei/pxp/Kconfig"
 
+endmenu
#8 lore raw
Quoted 14 lines · Adam Borowski
Quoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Adam Borowski
Quoted 2 lines · Tomas
Quoted 1 line

What is the exact issue you are experiencing, can you add the error

message this fixes?

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

The problem doesn't trigger in mainline

Then it's nothing we need to worry about in mainline. If/when other changes ever happen to need it here in mainline, we will gladly take the change.

Quoted 8 lines
Quoted 7 lines
Quoted 3 lines

For obvious reasons, we can't take patches for issues outside of our codebase. Nor do you want us to, as that way lies madness and an unmaintainable mess.

The problem in mainline is inconsistency: out of 6 config items, 4 repeat the "depends on X86 && PCI" line, the other 2 do not. There's indeed no immediate functional issue, but I'd argue that a dormant bug is

still a bug.

The MEI protocol (CONFIG_INTEL_MEI) is not PCI or X86 dependent. INTEL_MEI_GSC is PCI dependent but not X86. (Hope I correct also on implementation side) They HW layers are currently X86 dependent.

Quoted 56 lines
Quoted 4 lines

So we can fix the cosmetic (currently) issue on its own, or as part of the large patchset -- the latter having a side effect of stuffing your mailboxes more than needed (neither Greg, Arnd, nor Tomas are involved

in other bits).

Quoted 3 lines

But do the selects really require so much duplication? Perhaps I'm trying to fix the underlying issue wrong?

I think something along these lines would do (untested):

drivers/misc/mei/Kconfig index renamed from drivers/misc/mei/Kconfig +0 -0

d21486d69df2..8e5d79cff80b 100644

drivers/misc/mei/Kconfig +2 -7
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
-config INTEL_MEI
+menuconfig INTEL_MEI
        tristate "Intel Management Engine Interface"
        depends on X86 && PCI
        help
@@ -13,8 +13,6 @@ config INTEL_MEI
 
 config INTEL_MEI_ME
        tristate "ME Enabled Intel Chipsets"
-       select INTEL_MEI
-       depends on X86 && PCI
        help
          MEI support for ME Enabled Intel chipsets.
 
@@ -38,8 +36,6 @@ config INTEL_MEI_ME
 
 config INTEL_MEI_TXE
        tristate "Intel Trusted Execution Environment with ME Interface"
-       select INTEL_MEI
-       depends on X86 && PCI
        help
          MEI Support for Trusted Execution Environment device on Intel SoCs
 
@@ -48,9 +44,7 @@ config INTEL_MEI_TXE
 
 config INTEL_MEI_GSC
        tristate "Intel MEI GSC embedded device"
-       depends on INTEL_MEI
        depends on INTEL_MEI_ME
-       depends on X86 && PCI
        depends on DRM_I915
        help
          Intel auxiliary driver for GSC devices embedded in Intel graphics devices.
@@ -63,3 +57,4 @@ config INTEL_MEI_GSC
 source "drivers/misc/mei/hdcp/Kconfig"
 source "drivers/misc/mei/pxp/Kconfig"
 
+endmenu
maintainer
#9 lore raw
Quoted 11 lines · Tomas
Quoted 6 lines · Adam Borowski
Quoted 3 lines

The problem in mainline is inconsistency: out of 6 config items, 4 repeat the "depends on X86 && PCI" line, the other 2 do not. There's indeed no immediate functional issue, but I'd argue that a dormant bug is

still a bug.

The MEI protocol (CONFIG_INTEL_MEI) is not PCI or X86 dependent. INTEL_MEI_GSC is PCI dependent but not X86. (Hope I correct also on implementation side)
They HW layers are currently X86 dependent.

Ok, so in that case the dependencies should be relaxed like below I guess, in order to allow using the MEI on non-x86 i915 devices.

Arnd

drivers/misc/mei/Kconfig +2 -3
index d21486d69df2..7c6e3b4588d0 100644
@@ -2,7 +2,6 @@
 # Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
 config INTEL_MEI
        tristate "Intel Management Engine Interface"
-       depends on X86 && PCI
        help
          The Intel Management Engine (Intel ME) provides Manageability,
          Security and Media services for system containing Intel chipsets.
@@ -39,7 +38,7 @@ config INTEL_MEI_ME
 config INTEL_MEI_TXE
        tristate "Intel Trusted Execution Environment with ME Interface"
        select INTEL_MEI
-       depends on X86 && PCI
+       depends on X86
        help
          MEI Support for Trusted Execution Environment device on Intel SoCs
 
@@ -50,7 +49,7 @@ config INTEL_MEI_GSC
        tristate "Intel MEI GSC embedded device"
        depends on INTEL_MEI
        depends on INTEL_MEI_ME
-       depends on X86 && PCI
+       depends on PCI
        depends on DRM_I915
        help
          Intel auxiliary driver for GSC devices embedded in Intel graphics devices.
#10 lore raw
Quoted 33 lines · Tomas
Quoted 11 lines
Quoted 7 lines · Adam Borowski
Quoted 4 lines

The problem in mainline is inconsistency: out of 6 config items, 4 repeat the "depends on X86 && PCI" line, the other 2 do not. There's indeed no immediate functional issue, but I'd argue that a dormant bug is

still a bug.

The MEI protocol (CONFIG_INTEL_MEI) is not PCI or X86 dependent. INTEL_MEI_GSC is PCI dependent but not X86. (Hope I correct also on implementation side) They HW layers are currently X86 dependent.

Ok, so in that case the dependencies should be relaxed like below I guess, in order to allow using the MEI on non-x86 i915 devices.

Arnd

drivers/misc/mei/Kconfig index renamed from drivers/misc/mei/Kconfig +0 -0

d21486d69df2..7c6e3b4588d0 100644

drivers/misc/mei/Kconfig +0 -1
@@ -2,7 +2,6 @@
 # Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
 config INTEL_MEI
        tristate "Intel Management Engine Interface"
-       depends on X86 && PCI
        help
          The Intel Management Engine (Intel ME) provides Manageability,
          Security and Media services for system containing Intel chipsets.

drivers/misc/mei/Kconfig config INTEL_MEI_ME · line 41

Quoted 5 lines
drivers/misc/mei/Kconfig +1 -1
@@ -39,7 +38,7 @@ config INTEL_MEI_ME
 config INTEL_MEI_TXE
        tristate "Intel Trusted Execution Environment with ME Interface"
        select INTEL_MEI
-       depends on X86 && PCI
+       depends on X86

This should be both X86 and PCI, this is a HW dependent module

Quoted 12 lines
drivers/misc/mei/Kconfig +1 -1
        help
          MEI Support for Trusted Execution Environment device on Intel SoCs
 
@@ -50,7 +49,7 @@ config INTEL_MEI_GSC
        tristate "Intel MEI GSC embedded device"
        depends on INTEL_MEI
        depends on INTEL_MEI_ME
-       depends on X86 && PCI
+       depends on PCI
        depends on DRM_I915
        help
          Intel auxiliary driver for GSC devices embedded in Intel graphics devices.