From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Raag Jadav <raag.jadav@intel.com>
Cc: hansg@kernel.org, ilpo.jarvinen@linux.intel.com,
linus.walleij@linaro.org, brgl@bgdev.pl,
platform-driver-x86@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] platform/x86/intel: Introduce Intel Elkhart Lake PSE I/O
Date: Fri, 31 Oct 2025 12:02:14 +0200 [thread overview]
Message-ID: <aQSJJv7d2hllsObY@smile.fi.intel.com> (raw)
In-Reply-To: <aQSCpF8aR1lskaPy@black.igk.intel.com>
On Fri, Oct 31, 2025 at 10:34:28AM +0100, Raag Jadav wrote:
> On Wed, Oct 29, 2025 at 10:36:19AM +0200, Andy Shevchenko wrote:
> > On Wed, Oct 29, 2025 at 11:50:49AM +0530, Raag Jadav wrote:
...
> > > +#define EHL_PSE_IO_DEV_OFFSET SZ_4K
> > > +#define EHL_PSE_IO_DEV_SIZE SZ_4K
> >
> > Not sure if SZ_4K is a good idea for the _OFFSET, the _SIZE is fine. Also why
> > do we need two? If the devices are of the same size, we don't need to have a
> > separate offset.
>
> Yes but they're semantically different, atleast as per DEFINE_RES_MEM().
> Either way works for me.
They are "slices" in the HW, see also my "if the devices..." passage.
If you want to use SZ_* in _OFFSET, I would write it as (1 * SZ_4K) to point
out that size constant here is the _unit_ and not the size semantically.
Currently the definitions have the same values semantically, but you pointed
out that they should not be.
...
> > > + io_dev = kzalloc(sizeof(*io_dev), GFP_KERNEL);
> > > + if (!io_dev)
> > > + return -ENOMEM;
> >
> > Why devm_kzalloc() can't be used? I don't see if the device lifetime is anyhow
> > different to this object. Am I wrong?
>
> Looks like it but I don't know the code well enough to tell if there're
> corner cases, so just following the documented rules. Your call.
Do you expect this to be called in non-probe() contexts? If no --> devm.
Otherwise some comments are needed.
...
> > > + ret = __auxiliary_device_add(aux_dev, dev->driver->name);
> >
> > Hmm... Is it okay to use double underscored variant? Only a single driver uses
> > this so far... Care to elaborate?
>
> The regular variant uses KBUILD_MODNAME which comes with 'intel' prefix
> after commit df7f9acd8646, and with that we overshoot the max id string
> length for leaf drivers.
At bare minimum this needs a comment, but I think ideally we need to bump the
limit by factor of 2.
> > > + if (ret)
> > > + goto uninit_aux_dev;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-10-31 10:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 6:20 [PATCH v1 0/2] Introduce Intel Elkhart Lake PSE I/O Raag Jadav
2025-10-29 6:20 ` [PATCH v1 1/2] platform/x86/intel: " Raag Jadav
2025-10-29 8:36 ` Andy Shevchenko
2025-10-31 9:34 ` Raag Jadav
2025-10-31 10:02 ` Andy Shevchenko [this message]
2025-10-31 11:59 ` Raag Jadav
2025-10-31 12:49 ` Andy Shevchenko
2025-10-29 6:20 ` [PATCH v1 2/2] gpio: elkhartlake: Convert to auxiliary driver Raag Jadav
2025-10-29 8:38 ` Andy Shevchenko
2025-10-29 10:40 ` Bartosz Golaszewski
2025-10-29 11:13 ` Andy Shevchenko
2025-10-29 11:16 ` Bartosz Golaszewski
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=aQSJJv7d2hllsObY@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@bgdev.pl \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=raag.jadav@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