cdx: Enable COMPILE_TEST
PATCH 1/2 cdx: Enable COMPILE_TEST
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with COMPILE_TEST.
The CONFIG_OF dependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.
--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cdx/Kconfig +1 -1
@@ -7,7 +7,7 @@ config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TEST help Driver to enable Composable DMA Transfer(CDX) Bus. CDX bus exposes Fabric devices which uses composable DMA IP to the
Signature · 1 line
2.42.0
PATCH 2/2 cdx: Explicitly include correct DT includes, again
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
CDX was fixed once, but commit ("cdx: Remove cdx controller list from cdx bus system") added another occurrence.
--- drivers/cdx/cdx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/cdx/cdx.c +3 -0
@@ -57,7 +57,10 @@#include <linux/init.h> #include <linux/kernel.h> +#include <linux/of.h> #include <linux/of_device.h> +#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/mm.h> #include <linux/idr.h>
Signature · 1 line
2.42.0
RE: [PATCH 2/2] cdx: Explicitly include correct DT includes, again
Quoted 18 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Thursday, December 7, 2023 10:01 PM
To: Greg Kroah-Hartman <[email protected]>; Gupta, Nipun <[email protected]>; Agarwal, Nikhil <[email protected]>; Gangurde, Abhijit <[email protected]>
Cc: [email protected]
Subject: [PATCH 2/2] cdx: Explicitly include correct DT includes, againThe DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
Quoted 5 lines
CDX was fixed once, but commit ("cdx: Remove cdx controller list from cdx bus system") added another occurrence.
Fixes 54b406e10f03 ("cdx: Remove cdx controller list from cdx bus system")Signed-off-by Rob Herring <[email protected]>
kernel test robot
build botkernel test robot noticed the following build warnings:
Hi Rob,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.7-rc4 next-20231208]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Rob-Herring/cdx-Explicitly-include-correct-DT-includes-again/20231208-003335 base: linus/master patch link: https://lore.kernel.org/r/20231207163128.2707993-1-robh%40kernel.org patch subject: [PATCH 1/2] cdx: Enable COMPILE_TEST config: m68k-kismet-CONFIG_REMOTEPROC-CONFIG_CDX_CONTROLLER-0-0 (https://download.01.org/0day-ci/archive/20231209/[email protected]/config) reproduce: (https://download.01.org/0day-ci/archive/20231209/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for REMOTEPROC when selected by CDX_CONTROLLER
WARNING: unmet direct dependencies detected for REMOTEPROC
Depends on [n]: HAS_DMA [=n]
Selected by [y]:
- CDX_CONTROLLER [=y] && CDX_BUS [=y]
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Agarwal, Nikhil
maintainerQuoted 24 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Thursday, December 7, 2023 10:01 PM
To: Greg Kroah-Hartman <[email protected]>; Gupta, Nipun <[email protected]>; Agarwal, Nikhil <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] cdx: EnableCOMPILE_TESTThere is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig index renamed from drivers/cdx/Kconfig +0
-0
a08958485e31..7cdb7c414453100644
drivers/cdx/Kconfig line 10
Quoted 5 lines
drivers/cdx/Kconfig +1
-1@@ -7,7 +7,7 @@ config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TEST
Hi Rob,
There is a CDX MSI support patch
https://lore.kernel.org/lkml/[email protected]/ which is in review and is dependent on ARM64( msi_alloc_info_t definition differs on x86). So, the COMPILE_TEST would break once the MSI changes are added.
Regards
Nikhil
Quoted 32 lines · Nikhil
Quoted 25 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Thursday, December 7, 2023 10:01 PM
To: Greg Kroah-Hartman <[email protected]>; Gupta, Nipun <[email protected]>; Agarwal, Nikhil <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] cdx: EnableCOMPILE_TESTThere is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig index renamed from drivers/cdx/Kconfig +0
-0
a08958485e31..7cdb7c414453100644drivers/cdx/Kconfig line 10
Quoted 5 lines
drivers/cdx/Kconfig +1
-1@@ -7,7 +7,7 @@ config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTHi Rob,
Quoted 4 lines
There is a CDX MSI support patch
https://lore.kernel.org/lkml/[email protected]/ which is in review and is dependent onARM64( msi_alloc_info_t definition differs on x86). So, theCOMPILE_TESTwould break once the MSI changes are added.
An ifdef around 'scratchpad' should fix that. It is worthwhile to get all this to build on x86 allyesconfig builds at least because that is frequently built by the various CI systems. arm64 is getting there, but x86 is first for many.
Rob
Agarwal, Nikhil
maintainerQuoted 49 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Tuesday, December 12, 2023 7:56 PM
To: Agarwal, Nikhil <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>; Gupta, Nipun <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] cdx: EnableCOMPILE_TESTQuoted 26 lines · Nikhil
Quoted 26 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Thursday, December 7, 2023 10:01 PM
To: Greg Kroah-Hartman <[email protected]>; Gupta, Nipun <[email protected]>; Agarwal, Nikhil <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] cdx: EnableCOMPILE_TESTThere is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig index renamed from drivers/cdx/Kconfig +0
-0
a08958485e31..7cdb7c414453100644drivers/cdx/Kconfig +0
-0@@ -7,7 +7,7 @@Quoted 8 lines
drivers/cdx/Kconfig line 10
Quoted 4 lines
drivers/cdx/Kconfig +1
-1config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTHi Rob,
There is a CDX MSI support patch
https://lore.kernel.org/lkml/20231116125609.245206-1-Quoted 2 lines
om/ which is in review and is dependent on
ARM64( msi_alloc_info_t definition differs on x86). So, theCOMPILE_TESTwould break once the MSI
Quoted 7 lines
changes are added.
An ifdef around 'scratchpad' should fix that. It is worthwhile to get all this to build on x86 allyesconfig builds at least because that is frequently built by the various CI systems. arm64 is getting there, but x86 is first for many.
Rob
Thanks for the suggestion, Rob. We will change the MSI patch accordingly.
Quoted 16 lines · Rob Herring
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig +0
-0
drivers/cdx/Kconfig line 10
Quoted 5 lines
drivers/cdx/Kconfig +1
-1@@ -7,7 +7,7 @@ config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TEST
Ok, good start, now we need to turn this into a module, what's keeping it from being able to be built as a tristate?
thanks,
greg k-h
Quoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Rob Herring
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig +0
-0@@ -7,7 +7,7 @@
Quoted 7 lines
drivers/cdx/Kconfig line 10
Quoted 4 lines
drivers/cdx/Kconfig +1
-1config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTOk, good start, now we need to turn this into a module, what's keeping it from being able to be built as a tristate?
To answer my own question, the following errors:
ERROR: modpost: missing MODULE_LICENSE() in drivers/cdx/cdx.o
ERROR: modpost: "iommu_device_unuse_default_domain" [drivers/cdx/cdx.ko] undefined!
ERROR: modpost: "iommu_device_use_default_domain" [drivers/cdx/cdx.ko] undefined!
Would be great for someone to fix this up...
thanks,
greg k-h
Quoted 29 lines
Quoted 5 lines · Rob Herring
Quoted 4 lines
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it andall
Quoted 13 lines
Quoted 13 lines
the DT functions have empty stubs.
Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig +0
-0@@ -7,7 +7,7 @@Quoted 7 lines
drivers/cdx/Kconfig line 10
Quoted 4 lines
drivers/cdx/Kconfig +1
-1config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTOk, good start, now we need to turn this into a module, what's keeping it from being able to be built as a tristate?
To answer my own question, the following errors:
Quoted 7 lines
ERROR: modpost: missing
MODULE_LICENSE()indrivers/cdx/cdx.o
ERROR: modpost: "iommu_device_unuse_default_domain" [drivers/cdx/cdx.ko] undefined!
ERROR: modpost: "iommu_device_use_default_domain" [drivers/cdx/cdx.ko] undefined!Would be great for someone to fix this up...
I did look at this code. There are 2 issues here for it to be a module.
1. There are many symbols in iommu, msi and other module which are not exported. Most of other busses like amba, fslmc, pci are bool only.
2. As of now, iommu has static list on bus types (static struct bus_type * const iommu_buses[]) which is initializes the notifier at init time. So, if we change cdx bus to be a module
cdx devices would miss these mappings.
Thanks,
Abhijit
Quoted 35 lines · Abhijit
Quoted 35 lines
Quoted 5 lines · Rob Herring
Quoted 4 lines
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it andall
Quoted 13 lines
Quoted 13 lines
the DT functions have empty stubs.
Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig +0
-0@@ -7,7 +7,7 @@Quoted 7 lines
drivers/cdx/Kconfig line 10
Quoted 4 lines
drivers/cdx/Kconfig +1
-1config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTOk, good start, now we need to turn this into a module, what's keeping it from being able to be built as a tristate?
To answer my own question, the following errors:
ERROR: modpost: missing
MODULE_LICENSE()indrivers/cdx/cdx.o
ERROR: modpost: "iommu_device_unuse_default_domain" [drivers/cdx/cdx.ko] undefined!
ERROR: modpost: "iommu_device_use_default_domain" [drivers/cdx/cdx.ko] undefined!
Quoted 5 lines
Quoted 1 line
Would be great for someone to fix this up...
I did look at this code. There are 2 issues here for it to be a module.
1. There are many symbols in iommu, msi and other module which are not exported. Most of other busses like amba, fslmc, pci are bool only.
I only see 2 symbols here, what other ones do you see?
Quoted 3 lines
2. As of now, iommu has static list on bus types (static struct
bus_type* const iommu_buses[]) which is initializes the notifier at init time. So, if we change cdx bus to be a module
cdx devices would miss these mappings.
That static bus list needs to be fixed up eventually anyway as we are moving all bus structures to read-only-memory. So it's on my todo list...
Anyway, for now this is ok, but ideally if possible, and if you all want more build testing, it should be made a module.
thanks,
greg k-h
Quoted 37 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines · Rob Herring
Quoted 4 lines
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables itand
Quoted 22 lines
Quoted 22 lines
all
Quoted 20 lines
Quoted 12 lines
the DT functions have empty stubs.
Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig +0
-0drivers/cdx/Kconfig line 10
Quoted 5 lines
drivers/cdx/Kconfig +1
-1@@ -7,7 +7,7 @@ config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTOk, good start, now we need to turn this into a module, what's keeping it from being able to be built as a tristate?
Quoted 6 lines
Quoted 6 lines
To answer my own question, the following errors:
ERROR: modpost: missing
MODULE_LICENSE()indrivers/cdx/cdx.o
ERROR: modpost: "iommu_device_unuse_default_domain" [drivers/cdx/cdx.ko] undefined!
ERROR: modpost: "iommu_device_use_default_domain"[
drivers/cdx/cdx.ko]Quoted 2 lines
Quoted 2 lines
undefined!
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Would be great for someone to fix this up...
I did look at this code. There are 2 issues here for it to be a module.
1. There are many symbols in iommu, msi and other module which are notexported.
Quoted 1 line
Most of other busses like amba, fslmc, pci are bool only.
I only see 2 symbols here, what other ones do you see?
There are ~5 symbols from cdx msi patch
Thanks,
Abhijit
Quoted 39 lines · Abhijit
Quoted 39 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines · Rob Herring
Quoted 4 lines
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables itand
Quoted 22 lines
Quoted 22 lines
all
Quoted 20 lines
Quoted 12 lines
the DT functions have empty stubs.
Signed-off-by Rob Herring <[email protected]>--- drivers/cdx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cdx/Kconfig +0
-0drivers/cdx/Kconfig line 10
Quoted 5 lines
drivers/cdx/Kconfig +1
-1@@ -7,7 +7,7 @@ config CDX_BUS bool "CDX Bus driver" - depends on OF && ARM64 + depends on ARM64 || COMPILE_TESTOk, good start, now we need to turn this into a module, what's keeping it from being able to be built as a tristate?
Quoted 6 lines
Quoted 6 lines
To answer my own question, the following errors:
ERROR: modpost: missing
MODULE_LICENSE()indrivers/cdx/cdx.o
ERROR: modpost: "iommu_device_unuse_default_domain" [drivers/cdx/cdx.ko] undefined!
ERROR: modpost: "iommu_device_use_default_domain"[
drivers/cdx/cdx.ko]Quoted 4 lines
Quoted 3 lines
undefined!
Would be great for someone to fix this up...
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I did look at this code. There are 2 issues here for it to be a module.
1. There are many symbols in iommu, msi and other module which are notexported.
Quoted 1 line
Most of other busses like amba, fslmc, pci are bool only.
I only see 2 symbols here, what other ones do you see?
There are ~5 symbols from cdx msi patch
That hasn't been merged yet :)
Quoted 8 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Thursday, December 7, 2023 10:01 PM
To: Greg Kroah-Hartman <[email protected]>; Gupta, Nipun <[email protected]>; Agarwal, Nikhil <[email protected]>
Cc: [email protected]
Subject: [PATCH 1/2] cdx: EnableCOMPILE_TEST
Quoted 7 lines
There is no reason CDX needs to depend on ARM64 other than limiting visibility. So let's also enable building with
COMPILE_TEST.The
CONFIG_OFdependency is redundant as ARM64 always enables it and all the DT functions have empty stubs.Signed-off-by Rob Herring <[email protected]>