All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Vishnu Reddy" <busanna.reddy@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 02/12] iommu: Add iris-vpu-bus to iommu_buses
Date: Wed, 03 Jun 2026 14:34:18 +0000	[thread overview]
Message-ID: <20260603143418.DCC751F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260603-glymur-v7-2-afaa55d11fe0@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding a vendor-specific media driver virtual bus (`iris_vpu_bus_type`) to the core `iommu_buses` array is an architectural layering violation and abuses the device model.
--

commit 237441c1b5f7b6f9432bcd95591b1105966e57b0
Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>

iommu: Add iris-vpu-bus to iommu_buses

Add iris_vpu_bus_type to the iommu_buses array in the core IOMMU
subsystem so that the bus notifier callbacks are registered for
device addition and removal events.

> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index e8f13dcebbde5..fe51600953ceb 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -13,6 +13,7 @@
>  #include <linux/bug.h>
>  #include <linux/types.h>
>  #include <linux/init.h>
> +#include <linux/iris_vpu_bus.h>

[Severity: High]
Does this introduce a layering violation by pulling a vendor-specific media
driver header directly into the core IOMMU framework?

>  #include <linux/export.h>
>  #include <linux/slab.h>
>  #include <linux/errno.h>

[ ... ]

> @@ -200,6 +201,9 @@ static const struct bus_type * const iommu_buses[] = {
>  #ifdef CONFIG_CDX_BUS
>  	&cdx_bus_type,
>  #endif
> +#ifdef CONFIG_QCOM_IRIS_VPU_BUS
> +	&iris_vpu_bus_type,
> +#endif
>  };

[Severity: High]
Is it appropriate to add an artificial software bus created inside a single
media driver to the system-level hardware interconnects list here?

The iommu_buses array is generally intended for system-level hardware
interconnects like PCI or Platform buses. Modifying the core framework to
accommodate a vendor driver's private bus seems to couple subsystems together
incorrectly.

Additionally, because CONFIG_QCOM_IRIS_VPU_BUS is defined as a bool in the
driver's Kconfig and registers its bus using a postcore_initcall, this forces
the custom bus code into the core kernel binary even when the media driver is
built as a loadable module, leading to kernel bloat and abusing core
initialization levels.

Can generic solutions be used instead, such as using standard platform_device
child nodes or creating a standardized context bus?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260603-glymur-v7-0-afaa55d11fe0@oss.qualcomm.com?part=2

  reply	other threads:[~2026-06-03 14:34 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 14:18 [PATCH v7 00/12] media: iris: Add support for glymur platform Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 01/12] media: iris: Add iris vpu bus support Vishnu Reddy
2026-06-03 14:45   ` sashiko-bot
2026-06-08  5:35     ` Vishnu Reddy
2026-06-03 23:14   ` Dmitry Baryshkov
2026-06-03 14:18 ` [PATCH v7 02/12] iommu: Add iris-vpu-bus to iommu_buses Vishnu Reddy
2026-06-03 14:34   ` sashiko-bot [this message]
2026-06-08  5:37     ` Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 03/12] dt-bindings: media: qcom,glymur-iris: Add glymur video codec Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 04/12] media: iris: Add context bank hooks for platform specific initialization Vishnu Reddy
2026-06-03 14:36   ` sashiko-bot
2026-06-08  5:38     ` Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 05/12] media: iris: Enable Secure PAS support with IOMMU managed by Linux Vishnu Reddy
2026-06-03 14:39   ` sashiko-bot
2026-06-07 21:39     ` Dmitry Baryshkov
2026-06-08  5:38       ` Vishnu Reddy
2026-06-08  5:38     ` Vishnu Reddy
2026-06-08  5:55       ` Dmitry Baryshkov
2026-06-08  6:15         ` Vishnu Reddy
2026-06-07 21:38   ` Dmitry Baryshkov
2026-06-03 14:18 ` [PATCH v7 06/12] media: iris: Replace enum-indexed clock and power domain tables with per-block structures Vishnu Reddy
2026-06-03 14:37   ` sashiko-bot
2026-06-07 21:44     ` Dmitry Baryshkov
2026-06-08  5:38       ` Vishnu Reddy
2026-06-08  5:39     ` Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 07/12] media: iris: Add power sequence for glymur Vishnu Reddy
2026-06-07 21:47   ` Dmitry Baryshkov
2026-06-08  5:39     ` Vishnu Reddy
2026-06-08 12:08       ` Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 08/12] media: iris: Handle CPU_CS_SCIACMDARG3 register write via program bootup registers hook Vishnu Reddy
2026-06-07 21:48   ` Dmitry Baryshkov
2026-06-03 14:18 ` [PATCH v7 09/12] media: iris: Add support to select core for dual core platforms Vishnu Reddy
2026-06-03 14:44   ` sashiko-bot
2026-06-07 21:49     ` Dmitry Baryshkov
2026-06-08  5:39     ` Vishnu Reddy
2026-06-03 14:18 ` [PATCH v7 10/12] media: iris: Add platform data for glymur Vishnu Reddy
2026-06-03 14:46   ` sashiko-bot
2026-06-08  5:41     ` Vishnu Reddy
2026-06-07 21:50   ` Dmitry Baryshkov
2026-06-03 14:18 ` [PATCH v7 11/12] arm64: dts: qcom: glymur: Add iris video node Vishnu Reddy
2026-06-07 21:51   ` Dmitry Baryshkov
2026-06-03 14:18 ` [PATCH v7 12/12] arm64: dts: qcom: glymur-crd: Enable iris video codec node Vishnu Reddy
2026-06-07 21:51   ` Dmitry Baryshkov
2026-06-08  5:30 ` [PATCH v7 00/12] media: iris: Add support for glymur platform Vikash Garodia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260603143418.DCC751F00898@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=busanna.reddy@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.