From: Greg KH <gregkh@linuxfoundation.org>
To: "Gupta, Nipun" <nipun.gupta@amd.com>
Cc: linux-kernel@vger.kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, derek.kiernan@amd.com,
dragan.cvetic@amd.com, arnd@arndb.de, praveen.jain@amd.com,
harpreet.anand@amd.com, nikhil.agarwal@amd.com,
srivatsa@csail.mit.edu, code@tyhicks.com,
ptsm@linux.microsoft.com
Subject: Re: [RFC PATCH 1/2] drivers/misc: add silex multipk driver
Date: Thu, 13 Mar 2025 10:41:23 +0100 [thread overview]
Message-ID: <2025031328-unmanned-scale-faf4@gregkh> (raw)
In-Reply-To: <b43b6051-238b-207f-f0c5-3071950c1a0f@amd.com>
On Thu, Mar 13, 2025 at 02:46:11PM +0530, Gupta, Nipun wrote:
> On 12-03-2025 15:48, Greg KH wrote:
> > On Wed, Mar 12, 2025 at 03:24:20PM +0530, Nipun Gupta wrote:
> > > + return sprintf(buf,
> > > + "Hardware interface version: %d.%d.%d\n"
> > > + "Hardware implementation version: %d.%d.%d\n"
> > > + "Count request queues: %d\n"
> > > + "Total max pending requests: %d\n"
> > > + "Max pending requests per request queue: %d\n"
> > > + "Pkcores 64 multipliers: %d\n"
> > > + "Pkcores 256 multipliers: %d\n",
> > > + MPK_SEMVER_MAJOR(v), MPK_SEMVER_MINOR(v), MPK_SEMVER_PATCH(v),
> > > + MPK_HWVER_MAJOR(hwv), MPK_HWVER_MINOR(hwv), MPK_HWVER_SVN(hwv),
> > > + cnt, maxtotalreqs, rqmaxpending,
> > > + mults >> 16, mults & 0xFFFF);
> >
> > No!
> >
> > sysfs is "one value per file", which this is not at all.
>
> Will create separate entries for each.
Why is any of this needed in sysfs? Why not just use debugfs as it
looks like debugging information, right?
> > > + if (IS_ERR(multipk_class)) {
> > > + ret = PTR_ERR(multipk_class);
> > > + pr_err("can't register class\n");
> > > + goto err;
> > > + }
> > > + ret = alloc_chrdev_region(&devt, 0, MULTIPK_MAX_DEVICES, "multipk");
> >
> > Again, why not a dynamic misc device per device in the system?
> >
> > No need to make this harder than it is.
> >
> > But again, this really should use the in-kernel apis we already have for
> > this type of hardware, don't make a custom user/kernel api at all.
> > That's not going to scale or be easy to maintain for any amount of time.
>
> Agree to some extent, but as Crypto AF_ALG does not support offloading
> asymmetric operations, we added this driver as misc driver. This device is
> supported in AMD Versal series devices: https://www.amd.com/en/products/adaptive-socs-and-fpgas/versal/premium-series.html.
> We would maintain the driver with minimal possible user interface changes.
Please work with the crypto developers to add support for async
operations. And if that's not going to work out, we need an ack from
them explaining why this driver does not fit into the current framework
and that they are ok with this unique, custom, one-off, totally
out-of-the ordinary, custom userspace-software-requring, api that you
have created here.
thanks,
greg k-h
next prev parent reply other threads:[~2025-03-13 9:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 9:54 [RFC PATCH 1/2] drivers/misc: add silex multipk driver Nipun Gupta
2025-03-12 9:54 ` [RFC PATCH 2/2] dt-bindings: add device tree binding for silex multipk Nipun Gupta
2025-03-12 10:51 ` Krzysztof Kozlowski
2025-03-13 9:25 ` Gupta, Nipun
2025-03-13 9:38 ` Krzysztof Kozlowski
2025-03-13 9:43 ` Greg KH
2025-03-12 10:15 ` [RFC PATCH 1/2] drivers/misc: add silex multipk driver Greg KH
2025-03-12 10:18 ` Greg KH
2025-03-13 9:16 ` Gupta, Nipun
2025-03-13 9:41 ` Greg KH [this message]
2025-03-12 10:54 ` Krzysztof Kozlowski
2025-03-13 9:37 ` Gupta, Nipun
2025-03-13 11:47 ` kernel test robot
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=2025031328-unmanned-scale-faf4@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=code@tyhicks.com \
--cc=conor+dt@kernel.org \
--cc=derek.kiernan@amd.com \
--cc=dragan.cvetic@amd.com \
--cc=harpreet.anand@amd.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikhil.agarwal@amd.com \
--cc=nipun.gupta@amd.com \
--cc=praveen.jain@amd.com \
--cc=ptsm@linux.microsoft.com \
--cc=robh@kernel.org \
--cc=srivatsa@csail.mit.edu \
/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.