mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Mika Westerberg <westeri@kernel.org>,
	Andreas Noever <andreas.noever@gmail.com>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Sven Peter <sven@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v3 1/8] thunderbolt: Prefix NHI core functions with tb_ and tb_ring_
Date: Tue, 24 Nov 2026 17:11:59 +0100	[thread overview]
Message-ID: <20261124161159.GT229695@black.igk.intel.com> (raw)
In-Reply-To: <20261123113705.2297329-2-chunfeng.yun@mediatek.com>

On Mon, Nov 23, 2026 at 07:36:48PM +0800, Chunfeng Yun wrote:
> In preparation for modularizing PCIe NHI support and allowing PCIe
> and platform NHI drivers to be built as separate modules atop the
> Thunderbolt core framework, several NHI functions and structures will
> need to be exported.
> 
> Currently, several of these functions lack standard subsystem prefixes,
> risking namespace pollution or collisions across the flat kernel symbol
> namespace:
> 
> - ring_msix() lacks any subsystem prefix and diverges from all other
>   exported ring functions in the driver, which use the "tb_ring_" prefix.
> - nhi_probe(), nhi_shutdown(), and nhi_pm_ops lack the standard "tb_"
>   prefix used across the Thunderbolt public interface (such as struct
>   tb_nhi and struct tb_nhi_ops).
> - nhi_msi() is named after PCI MSI, even though the ISR simply schedules
>   the interrupt work and can serve as a generic ISR for non-PCIe platform
>   controllers as well.
> 
> Rename these functions and symbols to conform to Thunderbolt subsystem
> naming conventions before exporting them:
> 
> - ring_msix       -> tb_ring_msix

I think we can move MSI-X completely to pci.c. As far as I can tell ARM
stuff is not going to need that. While there we can drop MSI, that has been
never used (MSI-X was supported from day 0 by the HW).

Then I would just make the glue driver to pass ->irq to the core driver and
if that's set it does the request_irq() and so on. And PCI side does not
fill that because it uses MSIX always. Then we don't need to export the
interrupt handler functions either.

> - nhi_msi         -> tb_nhi_isr


> - nhi_probe       -> tb_nhi_probe
> - nhi_shutdown    -> tb_nhi_shutdown
> - nhi_pm_ops      -> tb_nhi_pm_ops

These are good.

  reply	other threads:[~2026-11-24 16:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 11:36 [PATCH 0/8] thunderbolt: Add support platform NHI driver Chunfeng Yun
2026-11-23 11:36 ` [PATCH v3 1/8] thunderbolt: Prefix NHI core functions with tb_ and tb_ring_ Chunfeng Yun
2026-11-24 16:11   ` Mika Westerberg [this message]
2026-11-23 11:36 ` [PATCH v3 2/8] thunderbolt: Move ICM mailbox functions to icm.c and internalize interrupt work Chunfeng Yun
2026-11-23 11:36 ` [PATCH v3 3/8] thunderbolt: Make PCIe NHI support opt-in Chunfeng Yun
2026-11-24 16:06   ` Mika Westerberg
2026-11-23 11:36 ` [PATCH v3 4/8] thunderbolt: Fix error handling and unwind paths in tb_nhi_probe() Chunfeng Yun
2026-11-23 11:36 ` [PATCH v3 5/8] thunderbolt: Add platform NHI driver Chunfeng Yun
2026-11-24 15:55   ` Mika Westerberg
2026-11-23 11:36 ` [PATCH v3 6/8] thunderbolt: Increase the lane adapter link-up timeout value Chunfeng Yun
2026-11-23 11:36 ` [PATCH v3 7/8] thunderbolt: Decouple the waiting time of TB_PORT_UNPLUGGED and TB_PORT_UP Chunfeng Yun
2026-11-24 16:00   ` Mika Westerberg
2026-11-23 11:36 ` [PATCH v3 8/8] thunderbolt: Drop WARN_ON() in tb_disconnect_pci() Chunfeng Yun

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=20261124161159.GT229695@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=sven@kernel.org \
    --cc=westeri@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®