From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Jadav, Raag" <raag.jadav@intel.com>,
"Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Subject: Re: [PATCH] drm/xe/pcode: Initialize data0 for pcode read routine
Date: Tue, 19 Aug 2025 14:40:18 +0000 [thread overview]
Message-ID: <e7ef84617854cdadeaa9a86d06c58c4ad43fd659.camel@intel.com> (raw)
In-Reply-To: <aKIFK2wGC8T6qarE@intel.com>
On Sun, 2025-08-17 at 12:36 -0400, Rodrigo Vivi wrote:
> On Wed, Aug 13, 2025 at 07:54:28PM +0000, stuartsummers wrote:
> > There are two registers filled in when reading data from
> > pcode besides the mailbox itself. Currently, we allow a NULL
> > value for the second of these two (data1) and assume the first
> > is defined. However, many of the routines that are calling
> > this function assume that pcode will ignore the value being
> > passed in and so leave that first value (data0) defined but
> > uninitialized. To be safe, make sure this value is always
> > initialized to something (0 generally) in the event pcode
> > behavior changes and starts using this value.
> >
> > Signed-off-by: stuartsummers <stuart.summers@intel.com>
>
> I was about to merge this, but I noticed your name seems odd.
>
> (in both author and signed-off)
>
> I mean, I could go ahead with this, but it is not like the
> ones you used in the past:
> Stuart Summers <stuart.summers@intel.com
>
> so I'm wondering it is a missconfiguration with your git
> and you might want to change... so, just let me know if I should
> just move with this as is..
Hi Rodrigo, thanks for pointing this out. It looks like my local git
was in fact misconfigured somehow :(. Let me clean this up and repost
before we merge this. Looks like this is also impacting the other
series I have out. I'll repost there as well.
Thanks,
Stuart
>
> > Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_device_sysfs.c | 8 ++++----
> > drivers/gpu/drm/xe/xe_hwmon.c | 8 ++++----
> > drivers/gpu/drm/xe/xe_vram_freq.c | 4 ++--
> > 3 files changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c
> > b/drivers/gpu/drm/xe/xe_device_sysfs.c
> > index bd9015761aa0..6ee422594b56 100644
> > --- a/drivers/gpu/drm/xe/xe_device_sysfs.c
> > +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
> > @@ -76,7 +76,7 @@ lb_fan_control_version_show(struct device *dev,
> > struct device_attribute *attr, c
> > {
> > struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
> > struct xe_tile *root = xe_device_get_root_tile(xe);
> > - u32 cap, ver_low = FAN_TABLE, ver_high = FAN_TABLE;
> > + u32 cap = 0, ver_low = FAN_TABLE, ver_high = FAN_TABLE;
> > u16 major = 0, minor = 0, hotfix = 0, build = 0;
> > int ret;
> >
> > @@ -115,7 +115,7 @@ lb_voltage_regulator_version_show(struct device
> > *dev, struct device_attribute *a
> > {
> > struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
> > struct xe_tile *root = xe_device_get_root_tile(xe);
> > - u32 cap, ver_low = VR_CONFIG, ver_high = VR_CONFIG;
> > + u32 cap = 0, ver_low = VR_CONFIG, ver_high = VR_CONFIG;
> > u16 major = 0, minor = 0, hotfix = 0, build = 0;
> > int ret;
> >
> > @@ -153,7 +153,7 @@ static int late_bind_create_files(struct device
> > *dev)
> > {
> > struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
> > struct xe_tile *root = xe_device_get_root_tile(xe);
> > - u32 cap;
> > + u32 cap = 0;
> > int ret;
> >
> > xe_pm_runtime_get(xe);
> > @@ -186,7 +186,7 @@ static void late_bind_remove_files(struct
> > device *dev)
> > {
> > struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
> > struct xe_tile *root = xe_device_get_root_tile(xe);
> > - u32 cap;
> > + u32 cap = 0;
> > int ret;
> >
> > xe_pm_runtime_get(xe);
> > diff --git a/drivers/gpu/drm/xe/xe_hwmon.c
> > b/drivers/gpu/drm/xe/xe_hwmon.c
> > index c17ed1ae8649..32a76ae6e9dc 100644
> > --- a/drivers/gpu/drm/xe/xe_hwmon.c
> > +++ b/drivers/gpu/drm/xe/xe_hwmon.c
> > @@ -179,7 +179,7 @@ static int xe_hwmon_pcode_rmw_power_limit(const
> > struct xe_hwmon *hwmon, u32 attr
> > u32 clr, u32 set)
> > {
> > struct xe_tile *root_tile = xe_device_get_root_tile(hwmon-
> > >xe);
> > - u32 val0, val1;
> > + u32 val0 = 0, val1 = 0;
> > int ret = 0;
> >
> > ret = xe_pcode_read(root_tile,
> > PCODE_MBOX(PCODE_POWER_SETUP,
> > @@ -734,7 +734,7 @@ static int xe_hwmon_power_curr_crit_read(struct
> > xe_hwmon *hwmon, int channel,
> > long *value, u32
> > scale_factor)
> > {
> > int ret;
> > - u32 uval;
> > + u32 uval = 0;
> >
> > mutex_lock(&hwmon->hwmon_lock);
> >
> > @@ -918,7 +918,7 @@ xe_hwmon_power_write(struct xe_hwmon *hwmon,
> > u32 attr, int channel, long val)
> > static umode_t
> > xe_hwmon_curr_is_visible(const struct xe_hwmon *hwmon, u32 attr,
> > int channel)
> > {
> > - u32 uval;
> > + u32 uval = 0;
> >
> > /* hwmon sysfs attribute of current available only for
> > package */
> > if (channel != CHANNEL_PKG)
> > @@ -1020,7 +1020,7 @@ xe_hwmon_energy_read(struct xe_hwmon *hwmon,
> > u32 attr, int channel, long *val)
> > static umode_t
> > xe_hwmon_fan_is_visible(struct xe_hwmon *hwmon, u32 attr, int
> > channel)
> > {
> > - u32 uval;
> > + u32 uval = 0;
> >
> > if (!hwmon->xe->info.has_fan_control)
> > return 0;
> > diff --git a/drivers/gpu/drm/xe/xe_vram_freq.c
> > b/drivers/gpu/drm/xe/xe_vram_freq.c
> > index b26e26d73dae..17bc84da4cdc 100644
> > --- a/drivers/gpu/drm/xe/xe_vram_freq.c
> > +++ b/drivers/gpu/drm/xe/xe_vram_freq.c
> > @@ -34,7 +34,7 @@ static ssize_t max_freq_show(struct device *dev,
> > struct device_attribute *attr,
> > char *buf)
> > {
> > struct xe_tile *tile = dev_to_tile(dev);
> > - u32 val, mbox;
> > + u32 val = 0, mbox;
> > int err;
> >
> > mbox = REG_FIELD_PREP(PCODE_MB_COMMAND,
> > PCODE_FREQUENCY_CONFIG)
> > @@ -56,7 +56,7 @@ static ssize_t min_freq_show(struct device *dev,
> > struct device_attribute *attr,
> > char *buf)
> > {
> > struct xe_tile *tile = dev_to_tile(dev);
> > - u32 val, mbox;
> > + u32 val = 0, mbox;
> > int err;
> >
> > mbox = REG_FIELD_PREP(PCODE_MB_COMMAND,
> > PCODE_FREQUENCY_CONFIG)
> > --
> > 2.34.1
> >
next prev parent reply other threads:[~2025-08-19 14:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 19:54 [PATCH] drm/xe/pcode: Initialize data0 for pcode read routine stuartsummers
2025-08-13 21:44 ` ✓ CI.KUnit: success for drm/xe/pcode: Initialize data0 for pcode read routine (rev2) Patchwork
2025-08-13 22:53 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-13 23:54 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-17 16:36 ` [PATCH] drm/xe/pcode: Initialize data0 for pcode read routine Rodrigo Vivi
2025-08-19 14:40 ` Summers, Stuart [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-08-19 20:10 Stuart Summers
2025-08-20 6:38 ` Raag Jadav
2025-08-22 16:26 ` Rodrigo Vivi
2025-08-08 15:36 stuartsummers
2025-08-08 16:38 ` Cavitt, Jonathan
2025-08-08 17:01 ` Summers, Stuart
2025-08-10 9:26 ` Raag Jadav
2025-08-11 15:29 ` Summers, Stuart
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=e7ef84617854cdadeaa9a86d06c58c4ad43fd659.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=raag.jadav@intel.com \
--cc=rodrigo.vivi@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 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.