[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 11/12] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h}


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Mon, 23 Jun 2025 15:18:52 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none 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=PhZT9PUfZYV50C7KkICGq/MzwGt9MACt4eHQPw+CGfY=; b=t8myiLZI2OhHf/O0/HFLybg9ub+uzdNWftsPRExReoNOXywRm9OJwlS1l43He4/1Ch2yYWqoxXUOu8KGWOArpO3UHkfxd1kRDMx3olVyZBQWaM64czeS2z2sf/Wg14yQ0ndSolKofXQz0bBp3qF6M/AfmbVNKH5oMxFAw4OGhUJ6GcwKmdqqfbyrvGV5bEthGrbKz3Tz4jlwl4tdJLwD+q5yvNrLKfDBbWLSJDYwbEZQ/SkL0OxSz/hShzKDig81noY8gt1A/VGJ3EZzRxpIrYZW0VY7bKVTlQ3E7Lw+ercGtfMBhjC4HU+d+rCxzJ/thvOqWmedekjljObg+a+qIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lRFhouuOxxg9HrmTHYocf62CQmGsPzYtYkVm78SuG1HdLNnJR5Sw1/v6T3JQkHL0qEkoCdzCkMFU9mYGUo0arX+duKZBZsH43rjN0HnpHHIg4wKv2jKQuwcOJSuEr5PJJdUZL8nP2K2eEOBnhbdaQ8KiSGaMJL83yNC4Q2Gg4kpUgCILe3PdWuQcdkaG3+JXf6IXMC1As46G1tY5akqOVRH7bU3cLHdr9PA0bRj+ePUzhB7h8TAatem1ChPekduai+TksUcJTESaKgniewCNPTEa1SDk/B0HIVsJks/ox2FcGVGPDUMt9levgvSBSa+xxWq9GiP+2FXaely348yutw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 23 Jun 2025 13:19:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon Jun 23, 2025 at 9:44 AM CEST, Jan Beulich wrote:
> On 20.06.2025 20:28, Alejandro Vallejo wrote:
>> device-tree.c stops requiring CONFIG_HAS_DEVICE_TREE_DISCOVERY and may
>> function with DOM0LESS_BOOT.
>> 
>> Without this, there's a clash with x86's definition of device_t. Because
>> x86 doesn't discover devices in the DT it can simply skip the code
>> to do so during the unflattening phase.
>> 
>> Not a functional change on architectures that currently use these files,
>> as they already select CONFIG_HAS_DEVICE_TREE_DISCOVERY.
>> 
>> Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>
>> ---
>>  xen/common/device-tree/device-tree.c | 2 ++
>>  xen/include/xen/device_tree.h        | 4 ++++
>>  2 files changed, 6 insertions(+)
>> 
>> diff --git a/xen/common/device-tree/device-tree.c 
>> b/xen/common/device-tree/device-tree.c
>> index 725ff71646..741e2ce585 100644
>> --- a/xen/common/device-tree/device-tree.c
>> +++ b/xen/common/device-tree/device-tree.c
>> @@ -2029,9 +2029,11 @@ static unsigned long unflatten_dt_node(const void 
>> *fdt,
>>              ((char *)pp->value)[sz - 1] = 0;
>>              dt_dprintk("fixed up name for %s -> %s\n", pathp,
>>                         (char *)pp->value);
>> +#ifdef CONFIG_HAS_DEVICE_TREE_DISCOVERY
>>              /* Generic device initialization */
>>              np->dev.type = DEV_DT;
>>              np->dev.of_node = np;
>> +#endif /* CONFIG_HAS_DEVICE_TREE_DISCOVERY */
>>          }
>>      }
>
> Without something said to that effect in the description, this contradicts
>
> obj-$(CONFIG_HAS_DEVICE_TREE_DISCOVERY) += device-tree/
>
> that the previous patch put in place, and that only the subsequent patch
> will further change.
>
> Jan

Would replacing the last paragraph of the commit message with...

  Not a functional change because the whole file is gated by
  CONFIG_HAS_DEVICE_TREE_DISCOVERY already. A later patch allows the file to be
  usable without it, for which this ifdefs are a prerequisite.

... help?

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.