diff mbox series

[for-next] RDMA/hfi1: Depend on !UML

Message ID 165755127879.2996325.5668395672492732376.stgit@awfm-02.cornelisnetworks.com (mailing list archive)
State Accepted
Headers show
Series [for-next] RDMA/hfi1: Depend on !UML | expand

Commit Message

Dennis Dalessandro July 11, 2022, 2:54 p.m. UTC
From: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>

Both hfi1 and UML depend on x86_64, this can trigger build errors.
This driver must depends on !UML because it accesses x86_64
features that are not supported by UML.

Signed-off-by: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
---
 drivers/infiniband/hw/hfi1/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky July 12, 2022, 9:54 a.m. UTC | #1
On Mon, Jul 11, 2022 at 10:54:38AM -0400, Dennis Dalessandro wrote:
> From: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
> 
> Both hfi1 and UML depend on x86_64, this can trigger build errors.
> This driver must depends on !UML because it accesses x86_64
> features that are not supported by UML.
> 
> Signed-off-by: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
> ---
>  drivers/infiniband/hw/hfi1/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)a

But why is this hfi1 specific change?
Shouldn't CONFIG_UML be disabled if someone choses !x86_64?

Thanks

> 
> diff --git a/drivers/infiniband/hw/hfi1/Kconfig b/drivers/infiniband/hw/hfi1/Kconfig
> index 6eb739052121..14b92e12bf29 100644
> --- a/drivers/infiniband/hw/hfi1/Kconfig
> +++ b/drivers/infiniband/hw/hfi1/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config INFINIBAND_HFI1
>  	tristate "Cornelis OPX Gen1 support"
> -	depends on X86_64 && INFINIBAND_RDMAVT && I2C
> +	depends on X86_64 && INFINIBAND_RDMAVT && I2C && !UML
>  	select MMU_NOTIFIER
>  	select CRC32
>  	select I2C_ALGOBIT
> 
>
Dennis Dalessandro July 12, 2022, 12:33 p.m. UTC | #2
On 7/12/22 5:54 AM, Leon Romanovsky wrote:
> On Mon, Jul 11, 2022 at 10:54:38AM -0400, Dennis Dalessandro wrote:
>> From: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
>>
>> Both hfi1 and UML depend on x86_64, this can trigger build errors.
>> This driver must depends on !UML because it accesses x86_64
>> features that are not supported by UML.
>>
>> Signed-off-by: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
>> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
>> ---
>>  drivers/infiniband/hw/hfi1/Kconfig |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)a
> 
> But why is this hfi1 specific change?
> Shouldn't CONFIG_UML be disabled if someone choses !x86_64?

This was discussed in [1]. Perhaps there is further work from UML folks
warranted. However there really isn't any reason to try to compile a HW driver
like hfi1 for UML and this will silence build warnings.

1: https://lore.kernel.org/linux-rdma/20220102070623.24009-1-rdunlap@infradead.org/

-Denny
Leon Romanovsky July 13, 2022, 6:57 a.m. UTC | #3
On Tue, Jul 12, 2022 at 08:33:17AM -0400, Dennis Dalessandro wrote:
> On 7/12/22 5:54 AM, Leon Romanovsky wrote:
> > On Mon, Jul 11, 2022 at 10:54:38AM -0400, Dennis Dalessandro wrote:
> >> From: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
> >>
> >> Both hfi1 and UML depend on x86_64, this can trigger build errors.
> >> This driver must depends on !UML because it accesses x86_64
> >> features that are not supported by UML.
> >>
> >> Signed-off-by: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
> >> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
> >> ---
> >>  drivers/infiniband/hw/hfi1/Kconfig |    2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)a
> > 
> > But why is this hfi1 specific change?
> > Shouldn't CONFIG_UML be disabled if someone choses !x86_64?
> 
> This was discussed in [1]. Perhaps there is further work from UML folks
> warranted. However there really isn't any reason to try to compile a HW driver
> like hfi1 for UML and this will silence build warnings.

I don't like this solution, but ok.

Thanks,
Acked-by: Leon Romanovsky <leonro@nvidia.com>
Leon Romanovsky July 18, 2022, 10:41 a.m. UTC | #4
On Mon, Jul 11, 2022 at 10:54:38AM -0400, Dennis Dalessandro wrote:
> From: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
> 
> Both hfi1 and UML depend on x86_64, this can trigger build errors.
> This driver must depends on !UML because it accesses x86_64
> features that are not supported by UML.
> 
> Signed-off-by: Ehab Ababneh <ehab.ababneh@cornelisnetworks.com>
> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
> ---
>  drivers/infiniband/hw/hfi1/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Thanks, applied.
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hfi1/Kconfig b/drivers/infiniband/hw/hfi1/Kconfig
index 6eb739052121..14b92e12bf29 100644
--- a/drivers/infiniband/hw/hfi1/Kconfig
+++ b/drivers/infiniband/hw/hfi1/Kconfig
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 config INFINIBAND_HFI1
 	tristate "Cornelis OPX Gen1 support"
-	depends on X86_64 && INFINIBAND_RDMAVT && I2C
+	depends on X86_64 && INFINIBAND_RDMAVT && I2C && !UML
 	select MMU_NOTIFIER
 	select CRC32
 	select I2C_ALGOBIT