From: Xu Yilun <yilun.xu@linux.intel.com>
To: "Manne, Nava kishore" <nava.kishore.manne@amd.com>
Cc: "mdf@kernel.org" <mdf@kernel.org>,
"hao.wu@intel.com" <hao.wu@intel.com>,
"yilun.xu@intel.com" <yilun.xu@intel.com>,
"trix@redhat.com" <trix@redhat.com>,
"robh@kernel.org" <robh@kernel.org>,
"saravanak@google.com" <saravanak@google.com>,
"linux-fpga@vger.kernel.org" <linux-fpga@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"git (AMD-Xilinx)" <git@amd.com>
Subject: Re: [RFC v3 1/1] fpga-region: Introduce ConfigFS interface for runtime FPGA configuration
Date: Wed, 9 Jul 2025 14:21:02 +0800 [thread overview]
Message-ID: <aG4KTuLExZCMw8rC@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <DS7PR12MB6070BC635C899C637EDE71F3CD7CA@DS7PR12MB6070.namprd12.prod.outlook.com>
> I’ve implemented the FPGA Region ConfigFS interface with the following hierarchy:
>
> /configfs
> └── fpga_regions ← Registered via configfs_register_subsystem()
> └── region0 ← Added using configfs_add_default_group()
> └── my_image ← Created via mkdir from userspace
> ├── firmware ← Write firmware name here
> └── config ← Trigger programming/unloading
Yes this is good to me.
> Observation:
> If configfs is not mounted before configfs_add_default_group() is invoked
> (e.g., when regions are registered early via base DTB), the path
> /configfs/fpga_regions/region0 does not appear in userspace,
> even though it’s properly initialized in the kernel.
>
> This appears to be due to how default groups function.
> they require the configfs filesystem to be mounted prior to the group
> addition in order to be visible. As a result, the mount order becomes
> a strict dependency, which may affect or break early-boot FPGA flows
> where regions are created before configfs is available.
I don't have answer here. But IIUC you are describing some generic
problem of configfs_add_default_group(). According to configfs.rst,
subsystem is also a config_group so it doesn't make sense to me a
subsystem works but a default subgroup can't. Unless configfs people
have proper justification, your observation is a bug and should try to
fix it.
>
> Proposal:
> Use configfs_register_subsystem(®ion->cfg_subsys) for each FPGA region
> instead of relying on configfs_add_default_group().
This seems a workaround. I don't prefer we give up on it so early...
Thanks,
Yilun
>
> This approach places each FPGA region directly under /configfs/region0,
> avoiding the timing issues associated with default groups.
> The interface becomes available as soon as configfs is mounted.
> regardless of when the region was registered
> (boot time via base DTB or dynamically via overlays).
>
> New user hierarchy:
> /configfs
> └── region0 ← Region appears as its own root node
> └── my_image ← Created via mkdir from userspace
> ├── firmware ← Write firmware name here
> └── config ← Trigger programming/unloading
>
> Would like to know if this approach looks good, or if there are better
> suggestions to handle this scenario?
>
> Regards,
> Navakishore.
prev parent reply other threads:[~2025-07-09 6:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 3:39 [RFC v3 0/1]Add user space interaction for FPGA programming Nava kishore Manne
2025-05-19 3:39 ` [RFC v3 1/1] fpga-region: Introduce ConfigFS interface for runtime FPGA configuration Nava kishore Manne
2025-06-01 15:01 ` Xu Yilun
2025-06-12 9:05 ` Manne, Nava kishore
2025-06-13 10:09 ` Xu Yilun
2025-06-20 11:15 ` Manne, Nava kishore
2025-07-09 5:34 ` Manne, Nava kishore
2025-07-09 6:21 ` Xu Yilun [this message]
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=aG4KTuLExZCMw8rC@yilunxu-OptiPlex-7050 \
--to=yilun.xu@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=git@amd.com \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=nava.kishore.manne@amd.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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®