[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3af51327-7745-4b18-a478-f47c57683576@amd.com>
Date: Mon, 24 Mar 2025 16:16:05 +0000
From: Alejandro Lucero Palau <alucerop@....com>
To: Simon Horman <horms@...nel.org>, alejandro.lucero-palau@....com
Cc: linux-cxl@...r.kernel.org, netdev@...r.kernel.org,
dan.j.williams@...el.com, edward.cree@....com, davem@...emloft.net,
kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com, dave.jiang@...el.com
Subject: Re: [PATCH v11 13/23] cxl: define a driver interface for DPA
allocation
On 3/20/25 16:18, Simon Horman wrote:
> On Mon, Mar 10, 2025 at 09:03:30PM +0000, alejandro.lucero-palau@....com wrote:
>> From: Alejandro Lucero <alucerop@....com>
>>
>> Region creation involves finding available DPA (device-physical-address)
>> capacity to map into HPA (host-physical-address) space. Define an API,
>> cxl_request_dpa(), that tries to allocate the DPA memory the driver
>> requires to operate. The memory requested should not be bigger than the
>> max available HPA obtained previously with cxl_get_hpa_freespace.
>>
>> Based on https://lore.kernel.org/linux-cxl/168592158743.1948938.7622563891193802610.stgit@dwillia2-xfh.jf.intel.com/
>>
>> Signed-off-by: Alejandro Lucero <alucerop@....com>
> Hi Alejandro,
Hi Simon,
>
> As reported by the Kernel Test Robot, in some circumstances this
> patch fails to build.
>
> I did not see this with x86_64 or arm64 allmodconfig.
> But I did see the problem on ARM and was able to reproduce it (quickly)
> like this using the toolchain here [*].
>
> $ PATH=.../gcc-12.3.0-nolibc/arm-linux-gnueabi/bin:$PATH
>
> $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make allmodconfig
> $ echo CONFIG_GCC_PLUGINS=n >> .config
> $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make oldconfig
>
> $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make drivers/cxl/core/hdm.o
> ...
> CC [M] drivers/cxl/core/hdm.o
> In file included from drivers/cxl/core/hdm.c:6:
> ./include/cxl/cxl.h:150:22: error: field 'dpa_range' has incomplete type
> 150 | struct range dpa_range;
> | ^~~~~~~~~
> ./include/cxl/cxl.h:221:30: error: field 'range' has incomplete type
> 221 | struct range range;
> |
>
> [*] https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/
>
> ...
Thanks for the references. I'll try it and figure out what is required.
>> diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c
> ...
>
>> +/**
>> + * cxl_request_dpa - search and reserve DPA given input constraints
>> + * @cxlmd: memdev with an endpoint port with available decoders
>> + * @is_ram: DPA operation mode (ram vs pmem)
>> + * @min: the minimum amount of capacity the call needs
> nit: @alloc should be documented instead of @min
>
I'll fix it.
Thanks!
Powered by blists - more mailing lists