[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Arm: device.c is init-only when OVERLAY_DTB=n
- To: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Thu, 23 Apr 2026 09:04:31 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 165.204.55.251) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7Z6V0vxoVpbh7739XmUgT+IFt6qAMu1fDUIzhMI2wsY=; b=g+r/9IZZ4TJGJ4QOFtJnMTc7ERDwVgBvKbuB5lK+HaoSM7D0dO5NrCErHz0cMD6fJl4zuM7HOrUmdsM6ia4JV5MA5GAdDA+d/HNQjTmqJkOa2sAjoyw/gOElIfm+mhO8kcILy6kvSqbj2zbTGcFX7dVQjDkE2HGaf5mE4pmLj8rDJtTTZGcoVtT74vhK1zKaWbcmI8NZok8tyzKYODYE5EsAgFrsY/sGnEJ29IQ5JVRl0nC+QyCiNeHa92OnJABbWNUt9vUgrPzRal9JBM6+966512PwFq96X9JfIpnFHTpGsKrxmsER6w5pn2V4+/loiASKbnzbGsBUZY7bBE3mYA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vK8LMdjbdx3p1m0cbEZhMPlKMrjPU9zMSri5y8Oeip2oqckDVm+MlBMnPpiPv8q+yS+19d+vluKqaEZwH5ymO7nV6uY7+Z71NnXE7w6ZF5aMvfS6gNaCRr30XT/V2BL6fgjV3VhWbWxyQuthYRXu6O+xiT2NSLizS9sw/6DoP76r39Ag8GZ0+FmkoEKRpW68KRndmQGvJBswu8cDX7zPEB5ECCupLE4DXy+lJWupo1+rDPWFPFGtrq1PSkIDZCACmajjQmyW/LGBpL+mh8P1ptQ4y/xLGLPAOp5+I4XqsynecJ33QGzeoViw1ayiOkQA9AHURBigU07+HeXxwYt3MQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 23 Apr 2026 07:04:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 27/02/2026 07:50, Jan Beulich wrote:
> On 26.02.2026 18:14, Andrew Cooper wrote:
>> On 26/02/2026 4:28 pm, Jan Beulich wrote:
>>> --- a/xen/arch/arm/Makefile
>>> +++ b/xen/arch/arm/Makefile
>>> @@ -15,7 +15,9 @@ obj-$(CONFIG_HAS_ALTERNATIVE) += alterna
>>> obj-y += cpuerrata.o
>>> obj-y += cpufeature.o
>>> obj-y += decode.o
>>> -obj-y += device.o
>>> +device-y := device.init.o
>>> +device-$(CONFIG_OVERLAY_DTB) := device.o
>>> +obj-y += $(device-y)
>>
>> I know we've argued over this before and not come to a conclusion, but I
>> still firmly believe this to be an anti-pattern we should expunge.
>>
>> obj-y += $(if $(CONFIG_OVERLAY_DTB),device.o,device.init.o)
>
> Whereas I think this one (in its adjusted form to really only accept 'y')
> is, firmly believing that the "lists everywhere" approach is the more
> readable and, more importantly, more scalable one. The form you suggest
> quickly gets to its limits when multiple CONFIG_* need dealing with.
I must admit that I prefer Andrew approach. It took me less time to understand
what the line does compared to your solution. I don't want to get involved in a
discussion about consistency here (for me we can use both depending on number of
CONFIG_ options), but with the line changed to what Andrew suggests:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
~Michal
|