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

Re: [PATCH v1 04/29] xen/asm-generic: introduce stub header device.h


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 23 Oct 2023 12:35:57 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=n/xjM4pQthFNuKbEnEZctnUokWT8FgHvVxnc84MARMQ=; b=Shu2T8fEMJifzlR5+mLVD+FNnUxQEO3PQ8E3q5p4joROJiqIPwWCRX5F1VbdKcuMTCOgXqG75ASVqYzkB/45ZtbQclTYu0v+W325A5EcQi+xyA8NSrg0J6vpZNSKZ0b06hpyOwke3opQXPrpLTse2UTAQTRf8mX90s7HfqcRlYDtgx399Iu0BzRxk+f60UCsDg6s0ZhaUQDj7yuqXHiplhCxRoS5NjpdfJfViKzWAueo3H8OIqpz3gxTexwTY1Aam8BsXdy4wF0KczCLjGBMvIBIOgFPDjDoCx4gzYID1sPGx0fkSmIirEuQ5xrSkTTUshAmJj9GDmBOd5OPsVfTgw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LInR/SPbVBcSIcdtJMCEKaAAma4k3Lr3WvKVciPhB+JneZXvZ3a2AC3NLvN1GoVr0RjNZmPSeT5QslHfah46Gve/I/XedKfXI7Tai18G7YMn1223Qi9Rr4+lkP4x1x2dlS9ejDPK9Jmyimlax0o66orPITJzgQY227SWMEGT4JsCV0rwDkz8CJnAMLYYZytj3Y73lEyRXC3m+qx6vYLu+yMO2cvTbAfEkGiILVLN7cgIusEj1w4OAsho6VtTnGnMUWMw3uDGMMQeebWRBdEjpDEBNAADEHVEveQw3Kpw/C4yWyOi5MV0ebXTo5YMSxWF6nRbbUC2fDLOz5FPL0HOgA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 23 Oct 2023 10:36:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.10.2023 12:12, Oleksii wrote:
> On Thu, 2023-10-19 at 11:14 +0200, Jan Beulich wrote:
>> On 14.09.2023 16:56, Oleksii Kurochko wrote:
>>> --- /dev/null
>>> +++ b/xen/include/asm-generic/device.h
>>> @@ -0,0 +1,65 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +#ifndef __ASM_GENERIC_DEVICE_H__
>>> +#define __ASM_GENERIC_DEVICE_H__
>>> +
>>> +struct dt_device_node;
>>> +
>>> +enum device_type
>>> +{
>>> +    DEV_DT,
>>> +    DEV_PCI,
>>> +};
>>
>> Are both of these really generic?
>>
>>> +struct device {
>>> +    enum device_type type;
>>> +#ifdef CONFIG_HAS_DEVICE_TREE
>>> +    struct dt_device_node *of_node; /* Used by drivers imported
>>> from Linux */
>>> +#endif
>>> +};
>>> +
>>> +enum device_class
>>> +{
>>> +    DEVICE_SERIAL,
>>> +    DEVICE_IOMMU,
>>> +    DEVICE_GIC,
>>
>> This one certainly is Arm-specific.
> Yes, but the definition of GIC sounds common, so I decided to leave it.
> But it can be changed.
> 
>>
>>> +    DEVICE_PCI_HOSTBRIDGE,
>>
>> And this one's PCI-specific.
>>
>> Overall same question as before: Are you expecting that RISC-V is
>> going to
>> get away without a customized header? I wouldn't think so.
> At least right now, I am using the same header device.h as in ARM,

Are you? I just double checked, and I can't see yours matching theirs.
First example of a difference is them having struct dev_archdata.

Jan

> and
> there wasn't a need for a customized version of the header.
> 
> ~ Oleksii
> 




 


Rackspace

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