This is a note to let you know that I've just added the patch titled drm/xe/hwmon: Remove unwanted write permission for currN_label to the 6.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-xe-hwmon-remove-unwanted-write-permission-for-cu.patch and it can be found in the queue-6.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit f385a4d83079b7e69b4d4dfa035ce7b8c747ee3c Author: Karthik Poosa <karthik.poosa@xxxxxxxxx> Date: Fri Apr 19 18:29:45 2024 +0530 drm/xe/hwmon: Remove unwanted write permission for currN_label [ Upstream commit 515f08972355e160f896f612347121fbb685e740 ] Change umode of currN_label from 0644 to 0444 as write permission not needed for label. Signed-off-by: Karthik Poosa <karthik.poosa@xxxxxxxxx> Reviewed-by: Riana Tauro <riana.tauro@xxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20240419125945.4085629-1-karthik.poosa@xxxxxxxxx Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c index bb815dbde63a..daf0d15354fe 100644 --- a/drivers/gpu/drm/xe/xe_hwmon.c +++ b/drivers/gpu/drm/xe/xe_hwmon.c @@ -551,12 +551,17 @@ xe_hwmon_curr_is_visible(const struct xe_hwmon *hwmon, u32 attr, int channel) { u32 uval; + /* hwmon sysfs attribute of current available only for package */ + if (channel != CHANNEL_PKG) + return 0; + switch (attr) { case hwmon_curr_crit: - case hwmon_curr_label: - if (channel == CHANNEL_PKG) return (xe_hwmon_pcode_read_i1(hwmon->gt, &uval) || (uval & POWER_SETUP_I1_WATTS)) ? 0 : 0644; + case hwmon_curr_label: + return (xe_hwmon_pcode_read_i1(hwmon->gt, &uval) || + (uval & POWER_SETUP_I1_WATTS)) ? 0 : 0444; break; default: return 0;