drivers/misc/Kconfig | 1 + 1 file changed, 1 insertion(+)
DPI hardware is an on-chip PCIe device on Marvell's arm64 SoC
platforms. As Arnd suggested, CN10K belongs to ARCH_THUNDER
lineage.
Patch makes mrvl_cn10k_dpi driver dependent on CONFIG_ARCH_THUNDER.
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
drivers/misc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 64fcca9e44d7..f3bb75384627 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -588,6 +588,7 @@ config NSM
config MARVELL_CN10K_DPI
tristate "Octeon CN10K DPI driver"
depends on PCI
+ depends on ARCH_THUNDER || COMPILE_TEST
help
Enables Octeon CN10K DMA packet interface (DPI) driver which
intializes DPI hardware's physical function (PF) device's
--
2.25.1
Hi Vamsi,
On Thu, Jul 11, 2024 at 05:01:15AM -0700, Vamsi Attunuru wrote:
> DPI hardware is an on-chip PCIe device on Marvell's arm64 SoC
> platforms. As Arnd suggested, CN10K belongs to ARCH_THUNDER
> lineage.
>
> Patch makes mrvl_cn10k_dpi driver dependent on CONFIG_ARCH_THUNDER.
>
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
> ---
> drivers/misc/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index 64fcca9e44d7..f3bb75384627 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -588,6 +588,7 @@ config NSM
> config MARVELL_CN10K_DPI
> tristate "Octeon CN10K DPI driver"
> depends on PCI
> + depends on ARCH_THUNDER || COMPILE_TEST
> help
> Enables Octeon CN10K DMA packet interface (DPI) driver which
> intializes DPI hardware's physical function (PF) device's
> --
> 2.25.1
>
After this change, ARCH=arm allmodconfig fails with:
drivers/misc/mrvl_cn10k_dpi.c: In function 'dpi_reg_write':
drivers/misc/mrvl_cn10k_dpi.c:190:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Wimplicit-function-declaration]
190 | writeq(val, dpi->reg_base + offset);
| ^~~~~~
| writeb
drivers/misc/mrvl_cn10k_dpi.c: In function 'dpi_reg_read':
drivers/misc/mrvl_cn10k_dpi.c:195:16: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Wimplicit-function-declaration]
195 | return readq(dpi->reg_base + offset);
| ^~~~~
| readb
Including one of the io-64-nonatomic headers would resolve this but I am
not sure which one would be appropriate (or perhaps the dependency
should be tightened to requiring 64BIT, as some other drivers have
done).
Cheers,
Nathan
On Tue, Jul 16, 2024, at 15:26, Nathan Chancellor wrote:
> On Thu, Jul 11, 2024 at 05:01:15AM -0700, Vamsi Attunuru wrote:
>>
>
> After this change, ARCH=arm allmodconfig fails with:
>
> drivers/misc/mrvl_cn10k_dpi.c: In function 'dpi_reg_write':
> drivers/misc/mrvl_cn10k_dpi.c:190:9: error: implicit declaration of
> function 'writeq'; did you mean 'writeb'?
> [-Wimplicit-function-declaration]
> 190 | writeq(val, dpi->reg_base + offset);
> | ^~~~~~
> | writeb
> drivers/misc/mrvl_cn10k_dpi.c: In function 'dpi_reg_read':
> drivers/misc/mrvl_cn10k_dpi.c:195:16: error: implicit declaration of
> function 'readq'; did you mean 'readb'?
> [-Wimplicit-function-declaration]
> 195 | return readq(dpi->reg_base + offset);
> | ^~~~~
> | readb
>
> Including one of the io-64-nonatomic headers would resolve this but I am
> not sure which one would be appropriate (or perhaps the dependency
> should be tightened to requiring 64BIT, as some other drivers have
> done).
Right, a dependency on 64BIT makes sense here. The alternative is
to include linux/io-64-nonatomic-hi-lo.h or linux/io-64-nonatomic-lo-hi.h
in order to have a replacement readq/writeq implementation that
works on 32-bit architectures. However, doing this requires
understanding whether what the side-effects of accessing the
64-bit registers are and whether they require writing the upper
or lower half of the register last.
Arnd
© 2016 - 2025 Red Hat, Inc.