hwtracing: HISI_PTT should depend on ARCH_HISI

Message ID 1a31a50f01e880f4c137298a12b8023c55f59cdc.1669044155.git.geert+renesas@glider.be
State New
Headers
Series hwtracing: HISI_PTT should depend on ARCH_HISI |

Commit Message

Geert Uytterhoeven Nov. 21, 2022, 3:23 p.m. UTC
  The HiSilicon PCIe Tune and Trace Device is a PCIe Root Complex
integrated Endpoint (RCiEP) device, which is only present on HiSilicon
SoCs.  Hence add a dependency on ARCH_HISI, to prevent asking the user
about this driver when configuring a kernel without HiSilicon SoC
support.

Fixes: ff0de066b4632ccb ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/hwtracing/ptt/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yicong Yang Nov. 23, 2022, 8:27 a.m. UTC | #1
Hi Geert,

On 2022/11/21 23:23, Geert Uytterhoeven wrote:
> The HiSilicon PCIe Tune and Trace Device is a PCIe Root Complex
> integrated Endpoint (RCiEP) device, which is only present on HiSilicon
> SoCs.  Hence add a dependency on ARCH_HISI, to prevent asking the user
> about this driver when configuring a kernel without HiSilicon SoC
> support.
> 

I don't think we want this since:

1. Our PCIe IP is very common which does not highly depends on specific platforms, it can be used on other products
2. I'm not sure all the products will have ARCH_HISI. if we have this dependence then we cannot see this configuration

The driver config is default to N so I'd prefer to keep it as is.

Thanks.

> Fixes: ff0de066b4632ccb ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/hwtracing/ptt/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/ptt/Kconfig b/drivers/hwtracing/ptt/Kconfig
> index 6d46a09ffeb91992..96ee94a5d5b9fab8 100644
> --- a/drivers/hwtracing/ptt/Kconfig
> +++ b/drivers/hwtracing/ptt/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config HISI_PTT
>  	tristate "HiSilicon PCIe Tune and Trace Device"
> -	depends on ARM64 || (COMPILE_TEST && 64BIT)
> +	depends on ARCH_HISI || (COMPILE_TEST && 64BIT)
>  	depends on PCI && HAS_DMA && HAS_IOMEM && PERF_EVENTS
>  	help
>  	  HiSilicon PCIe Tune and Trace device exists as a PCIe RCiEP
>
  

Patch

diff --git a/drivers/hwtracing/ptt/Kconfig b/drivers/hwtracing/ptt/Kconfig
index 6d46a09ffeb91992..96ee94a5d5b9fab8 100644
--- a/drivers/hwtracing/ptt/Kconfig
+++ b/drivers/hwtracing/ptt/Kconfig
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 config HISI_PTT
 	tristate "HiSilicon PCIe Tune and Trace Device"
-	depends on ARM64 || (COMPILE_TEST && 64BIT)
+	depends on ARCH_HISI || (COMPILE_TEST && 64BIT)
 	depends on PCI && HAS_DMA && HAS_IOMEM && PERF_EVENTS
 	help
 	  HiSilicon PCIe Tune and Trace device exists as a PCIe RCiEP