[PATCH v9 1/7] cdx: add the cdx bus driver

Greg KH gregkh at linuxfoundation.org
Thu Mar 9 05:07:53 PST 2023


On Tue, Mar 07, 2023 at 06:49:11PM +0530, Nipun Gupta wrote:
> Introduce AMD CDX bus, which provides a mechanism for scanning
> and probing CDX devices. These devices are memory mapped on
> system bus for Application Processors(APUs).
> 
> CDX devices can be changed dynamically in the Fabric and CDX
> bus interacts with CDX controller to rescan the bus and
> rediscover the devices.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta at amd.com>
> Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren at amd.com>
> Tested-by: Nikhil Agarwal <nikhil.agarwal at amd.com>
> ---
>  Documentation/ABI/testing/sysfs-bus-cdx |  12 +
>  MAINTAINERS                             |   7 +
>  drivers/Kconfig                         |   2 +
>  drivers/Makefile                        |   1 +
>  drivers/cdx/Kconfig                     |  17 +
>  drivers/cdx/Makefile                    |   8 +
>  drivers/cdx/cdx.c                       | 407 ++++++++++++++++++++++++
>  drivers/cdx/cdx.h                       |  62 ++++
>  include/linux/cdx/cdx_bus.h             | 147 +++++++++
>  include/linux/mod_devicetable.h         |  15 +
>  scripts/mod/devicetable-offsets.c       |   4 +
>  scripts/mod/file2alias.c                |  12 +
>  12 files changed, 694 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-cdx
>  create mode 100644 drivers/cdx/Kconfig
>  create mode 100644 drivers/cdx/Makefile
>  create mode 100644 drivers/cdx/cdx.c
>  create mode 100644 drivers/cdx/cdx.h
>  create mode 100644 include/linux/cdx/cdx_bus.h
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-cdx b/Documentation/ABI/testing/sysfs-bus-cdx
> new file mode 100644
> index 000000000000..063d1a0dd866
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-bus-cdx
> @@ -0,0 +1,12 @@
> +What:		/sys/bus/cdx/rescan
> +Date:		March 2023
> +Contact:	nipun.gupta at amd.com
> +Description:
> +		Writing a non-zero value to this file cause rescan of the bus
> +		and devices on the CDX bus. Any new devices are scanned and
> +		added to the list of Linux devices and any devices removed are
> +		also deleted from Linux.
> +
> +		For example::
> +
> +		  # echo 1 > /sys/bus/cdx/rescan

See my comments on patch 7/7 about "non-zero" not being a good idea.

thanks,

greg k-h



More information about the linux-arm-kernel mailing list