[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 Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 19 Oct 2023 11:14:41 +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=r++V9lfQ29gh4CO7YslRm56X49EXxs5HjnB0TpT98Ds=; b=X7OQyaFT3mAlECStReTEsLaEFRxSYH+++wqNIxk3gqO5pn5mGzOSZRl/yXLqrB+QHP26A/O6AAZsArEGteoA8QseyFVZfkHzuDZ0d4eeX/er6Z7P/LM2bpAYP5xxoStXZvUE6r8ZHX+jDd0k2jBhbgt2ZfXLSRZsBYW9T3XD1qt0mTpW3wyTjjrYkUKU0IFCds0Eydth1Pulnh6jOIO9JtcN1e2GG1NryUCJTyxjYtDKp/yMpE9oOmVvxSpWrFktymxuO4zFoKklJNUWFRbxJex+nzfLk2Rd5EfE7HdfvdjXG4F9CmoDyL7muChkKo6Ms5X4ygBwSWZ8IJlD2T7EFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=loCPZ1j7b7uDxTHr+QFhr/JGftfvughUG392jLL3AUM1WNZCkRfqLpNpAIY0mGwcEpue3+On0UFFwoEkV13F6zznfg7dcszdrNdBoXFv0oiApYJG0cmIIWX5dZqvBOvr+REvSaglonZ48Ksh/89Re56TeZ6/ENMmL5gVuJtmSvon3Idg6x6XjYUzdIA97x17tV6n8fLtPiN82DvdSWWHBFsxoJuUvTW+Ete9pwVplpd6+fe8F2CHDEGt4aX6TRgc0zO6zWMaquhOd78gjn9buZmu0zr0BiSk/wcWf1o6Uv9Hk/+VPOiPmRgpLsd/5vZ9gu/bjYjEi1b/hmLe76Oi1g==
  • 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: Thu, 19 Oct 2023 09:14:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> +    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.

Jan



 


Rackspace

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