[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 02/15] xen/asm-generic: introduce generic device.h
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 13 Nov 2023 17:43:39 +0100
- 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=2BbK6sxOg1Gc0ynyNYi1X5rCO6gGZ0+ym60kqIBXVis=; b=gISZhbpNH8kZ1CDCfwXw2qSbhdetXp6T21+jUTTZCei6BbVwGRl9Am4leqPeX3d89jEwVv/olrI+EXR2rcEC4s5bIYvpjF6Se3WnH0ypJqch2hdNnJLEtfOmbYsety/iFgmNMh/DW0woru2Yf67sWuay2XqezP15QNEOySD2zUSAi1Jl7c/n0LhH3WjMNYAmN3/M+gamvC88+vkBvfmAnA0NwufOj4hhXtfYV4pDHyMaNp+iCT23cAlbhqRRbaq1kSDJ3IbHNwTl014ZMn+/PYRK6zO7H7hDKVQnzt/a1UVnn9ea/ju0OZ5PwFx/me/HYKU0KVMbU0zoUZCRUponpg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lRPt49y72LtwGMQD4vuQ83Qo8bKExNbtwMF2s7QD2HaEFiMb1/A3zfyODRBUt+d9Fmv8nR6avBYmzUHdOBlRUiF3D/Gj5l3e7WYmLGhGV9WywWr+vG8rj532YrFhF71zgdifrVd1ggeZeCd+rUfXYDGibSPFtTZKWVXEIhu8ABVVXI6oJpumPx4AnRlbH31ZNPMwsR+IxAZv0Dqf6sLdOSKzqBk86LQGkz6JDDF9RBMQLTk07nnfuTgDiSelc3e9e8nW34DBfy8KGYMCHgnIEDYwKMYkBos7CmtyHBlCS71LqSg1VYN4qWFn0Ed0vlwtauw+9N0sDgjTWqSC5yAoAQ==
- 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, 13 Nov 2023 16:43:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 10.11.2023 17:30, Oleksii Kurochko wrote:
> --- /dev/null
> +++ b/xen/include/asm-generic/device.h
> @@ -0,0 +1,140 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ASM_GENERIC_DEVICE_H__
> +#define __ASM_GENERIC_DEVICE_H__
> +
> +enum device_type
> +{
> + DEV_DT,
> +#ifdef HAS_PCI
> + DEV_PCI,
> +#endif
> +};
> +
> +struct dev_archdata {
> + void *iommu; /* IOMMU private data */
> +};
> +
> +/* struct device - The basic device structure */
> +struct device
> +{
> + enum device_type type;
> +#ifdef CONFIG_HAS_DEVICE_TREE
> + struct dt_device_node *of_node; /* Used by drivers imported from Linux */
> +#endif
There's just this instance where HAS_DEVICE_TREE is checked. Why not elsewhere?
Imo, if you really want this header in asm-generic/, then it wants to be truly
generic (i.e. not implying DT just like you're not implying PCI or ACPI).
Jan
|