Skip to contentSkip to conversation

firmware: intel_stratix10_service: add hardware dependency

PATCH Superseded [email protected] 4 participants 8 messages Jan 23, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: intel_stratix10_service: add hardware dependency

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +1 -1
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
 config INTEL_STRATIX10_SERVICE
 	tristate "Intel Stratix10 Service Layer"
-	depends on HAVE_ARM_SMCCC
+	depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC
 	default n
 	help
 	  Intel Stratix10 service layer runs at privileged exception level,
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 5 lines
drivers/firmware/Kconfig +1 -1
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
 config INTEL_STRATIX10_SERVICE
 	tristate "Intel Stratix10 Service Layer"
-	depends on HAVE_ARM_SMCCC
+	depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

And is this needed now, for 5.0-final, or can it wait for 5.1? What changed to require this?

tahnks,

greg k-h

#2 lore raw

On Wed, Jan 23, 2019 at 10:00 AM Greg KH <[email protected]> wrote:

Hi Greg,

Quoted 18 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:
Quoted 16 lines

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
Quoted 6 lines

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 4 lines
drivers/firmware/Kconfig +1 -1
 config INTEL_STRATIX10_SERVICE
      tristate "Intel Stratix10 Service Layer"
-     depends on HAVE_ARM_SMCCC
+     depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

Do you mean this instead?

depends on (ARCH_STRATIX10 && HAVE_ARM_SMCCC) || COMPILE_TEST

Quoted 2 lines

And is this needed now, for 5.0-final, or can it wait for 5.1?

This change will reduce kernel size for most arm64. It can go into whichever kernel. We can resubmit allowing for COMPILE_TEST.

Quoted 2 lines

What
changed to require this?

Nothing, we just didn't catch this. We're used to having our own defconfig. Not used to having a single defconfig that is shared.

Thanks for the review comments,
Alan

Quoted 4 lines

tahnks,

greg k-h

#3 lore raw
Quoted 31 lines · Alan Tull

On Wed, Jan 23, 2019 at 10:00 AM Greg KH <[email protected]> wrote:

Hi Greg,

Quoted 18 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:
Quoted 16 lines

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
Quoted 6 lines

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 4 lines
drivers/firmware/Kconfig +1 -1
 config INTEL_STRATIX10_SERVICE
      tristate "Intel Stratix10 Service Layer"
-     depends on HAVE_ARM_SMCCC
+     depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

Do you mean this instead?

Quoted 8 lines

depends on (ARCH_STRATIX10 && HAVE_ARM_SMCCC) || COMPILE_TEST

Quoted 2 lines

And is this needed now, for 5.0-final, or can it wait for 5.1?

This change will reduce kernel size for most arm64. It can go into whichever kernel. We can resubmit allowing for COMPILE_TEST.

I don't see how this is true? ARM64 has a single defconfig and ARCH_STRATIX10 is included in that defconfig. I don't see how adding this dependency will reduce the kernel size for most arm64?

Dinh

#4 lore raw
Quoted 40 lines · Dinh Nguyen
Quoted 36 lines · Alan Tull

On Wed, Jan 23, 2019 at 10:00 AM Greg KH <[email protected]> wrote:

Hi Greg,

Quoted 18 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:
Quoted 16 lines

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
Quoted 6 lines

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 4 lines
drivers/firmware/Kconfig +1 -1
 config INTEL_STRATIX10_SERVICE
      tristate "Intel Stratix10 Service Layer"
-     depends on HAVE_ARM_SMCCC
+     depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

Do you mean this instead?

depends on (ARCH_STRATIX10 && HAVE_ARM_SMCCC) || COMPILE_TEST

Quoted 2 lines

And is this needed now, for 5.0-final, or can it wait for 5.1?

Quoted 7 lines
Quoted 3 lines

This change will reduce kernel size for most arm64. It can go into whichever kernel. We can resubmit allowing for COMPILE_TEST.

I don't see how this is true? ARM64 has a single defconfig and ARCH_STRATIX10 is included in that defconfig. I don't see how adding this dependency will reduce the kernel size for most arm64?

Sorry, I wasn't clear. By default it will be built in since there's one arm64 defconfig. But adding ARCH_STRATIX10 dependency here supports users who turn off all the ARCH_* they don't care about in their own defconfig that won't get upstreamed.

Quoted 2 lines

Dinh

#5 lore raw
Quoted 45 lines · Alan Tull
Quoted 44 lines · Dinh Nguyen
Quoted 39 lines · Alan Tull

On Wed, Jan 23, 2019 at 10:00 AM Greg KH <[email protected]> wrote:

Hi Greg,

Quoted 18 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:
Quoted 16 lines

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
Quoted 6 lines

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 4 lines
drivers/firmware/Kconfig +1 -1
 config INTEL_STRATIX10_SERVICE
      tristate "Intel Stratix10 Service Layer"
-     depends on HAVE_ARM_SMCCC
+     depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

Do you mean this instead?

depends on (ARCH_STRATIX10 && HAVE_ARM_SMCCC) || COMPILE_TEST

Quoted 2 lines

And is this needed now, for 5.0-final, or can it wait for 5.1?

This change will reduce kernel size for most arm64. It can go into whichever kernel. We can resubmit allowing for COMPILE_TEST.

Quoted 9 lines
Quoted 3 lines

I don't see how this is true? ARM64 has a single defconfig and ARCH_STRATIX10 is included in that defconfig. I don't see how adding this dependency will reduce the kernel size for most arm64?

Sorry, I wasn't clear. By default it will be built in since there's one arm64 defconfig. But adding ARCH_STRATIX10 dependency here supports users who turn off all the ARCH_* they don't care about in their own defconfig that won't get upstreamed.

Ah yes, forgot to consider that.

Dinh

#6 lore raw
In reply to Alan Tull
Quoted 29 lines · Alan Tull

On Wed, Jan 23, 2019 at 10:00 AM Greg KH <[email protected]> wrote:

Hi Greg,

Quoted 18 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:
Quoted 16 lines

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
 drivers/firmware/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
Quoted 6 lines

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 4 lines
drivers/firmware/Kconfig +1 -1
 config INTEL_STRATIX10_SERVICE
      tristate "Intel Stratix10 Service Layer"
-     depends on HAVE_ARM_SMCCC
+     depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

Quoted 3 lines

Do you mean this instead?

depends on (ARCH_STRATIX10 && HAVE_ARM_SMCCC) || COMPILE_TEST

Yes, that would be better, right?

Quoted 5 lines
Quoted 2 lines

And is this needed now, for 5.0-final, or can it wait for 5.1?

This change will reduce kernel size for most arm64. It can go into whichever kernel. We can resubmit allowing for COMPILE_TEST.

So it's not fixing a bug, but rather just allowing you to shrink an image? If so, then 5.1 is good.

Please resubmit, after making sure it doesn't break the normal builds :)

thanks,

greg k-h

#7 lore raw

Hi Greg,

Quoted 39 lines · Greg KH
Quoted 29 lines · Alan Tull

On Wed, Jan 23, 2019 at 10:00 AM Greg KH <[email protected]> wrote:

Hi Greg,

Quoted 18 lines · On Wed, Jan 23, 2019 at 09:47:56AM -0600, [email protected] wrote:
Quoted 16 lines

From: Richard Gong <[email protected]>

Add a Kconfig dependency to ensure Intel Stratix10 service layer driver can be built only on the platform that supports it.

---
  drivers/firmware/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/Kconfig +0 -0
index f754578..cac16c4 100644
@@ -218,7 +218,7 @@ config FW_CFG_SYSFS_CMDLINE
 
Quoted 6 lines

drivers/firmware/Kconfig config FW_CFG_SYSFS_CMDLINE · line 221

Quoted 4 lines
drivers/firmware/Kconfig +1 -1
  config INTEL_STRATIX10_SERVICE
       tristate "Intel Stratix10 Service Layer"
-     depends on HAVE_ARM_SMCCC
+     depends on ARCH_STRATIX10 && HAVE_ARM_SMCCC

That's lame, what about building for testing?

Quoted 3 lines

Do you mean this instead?

depends on (ARCH_STRATIX10 && HAVE_ARM_SMCCC) || COMPILE_TEST

Yes, that would be better, right?

Quoted 3 lines
Quoted 2 lines

And is this needed now, for 5.0-final, or can it wait for 5.1?

Quoted 7 lines
Quoted 2 lines

This change will reduce kernel size for most arm64. It can go into whichever kernel. We can resubmit allowing for COMPILE_TEST.

So it's not fixing a bug, but rather just allowing you to shrink an image? If so, then 5.1 is good.

Please resubmit, after making sure it doesn't break the normal builds :)

Thanks for your review comments, I will resubmit the patch.

Quoted 5 lines

thanks,

greg k-h