Re: [PATCH v2 15/17] platform/x86/intel/ifs: Remove limit on number of batch files
From: Ilpo Järvinen
Date: Thu Nov 19 2026 - 07:09:46 EST
On Wed, 18 Nov 2026, Ehab Ababneh wrote:
> From: Tony Luck <tony.luck@xxxxxxxxx>
>
> Writing to the current_batch sysfs file rejects batch numbers above
> 0xff. That limit was expected to be enough, but Diamond Rapids needs
> more than 256 IFS test image (batch) files.
>
> Remove the limit check on the batch number supplied by the user.
>
> [ Qiuxu: Update IFS ABI documentation to reflect the change. ]
????
Please don't submit garbage notes relating to development of the patch.
> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> Signed-off-by: Ehab Ababneh <ehab.ababneh@xxxxxxxxx>
> Tested-by: Yi Lai <yi1.lai@xxxxxxxxx>
> ---
> Documentation/ABI/testing/sysfs-platform-intel-ifs | 9 ++++++---
> drivers/platform/x86/intel/ifs/sysfs.c | 2 +-
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-platform-intel-ifs b/Documentation/ABI/testing/sysfs-platform-intel-ifs
> index 11cd2f412d81..22430926ceaa 100644
> --- a/Documentation/ABI/testing/sysfs-platform-intel-ifs
> +++ b/Documentation/ABI/testing/sysfs-platform-intel-ifs
> @@ -46,9 +46,12 @@ What: /sys/devices/virtual/misc/intel_ifs_<N>/current_batch
> Date: Nov 16 2022
> KernelVersion: 6.2
> Contact: "Jithu Joseph" <jithu.joseph@xxxxxxxxx>
> -Description: Write a number less than or equal to 0xff to load an IFS test image.
> - The number written treated as the 2 digit suffix in the following file name:
> - /lib/firmware/intel/ifs_<N>/ff-mm-ss-02x.scan
> +Description: Write a number to load an IFS test image.
> + The number written is used as the <batch> suffix in the following file name:
> + /lib/firmware/intel/ifs_<N>/ff-mm-ss-<batch>.scan
> + where ff, mm and ss are the CPU family, model and stepping, and <batch> is
> + the number written, in lowercase hex, zero-padded to at least 2 digits
> + (e.g. 02, ff, 100).
> Reading the file will provide the suffix of the currently loaded IFS test image.
> This file is present only for device instances where a test image is applicable.
> Devices: intel_ifs_0
> diff --git a/drivers/platform/x86/intel/ifs/sysfs.c b/drivers/platform/x86/intel/ifs/sysfs.c
> index 1a111e6101d8..1a0bfa2a2821 100644
> --- a/drivers/platform/x86/intel/ifs/sysfs.c
> +++ b/drivers/platform/x86/intel/ifs/sysfs.c
> @@ -91,7 +91,7 @@ static ssize_t current_batch_store(struct device *dev,
> int rc;
>
> rc = kstrtouint(buf, 0, &cur_batch);
> - if (rc < 0 || cur_batch > 0xff)
> + if (rc < 0)
> return -EINVAL;
>
> if (down_interruptible(&ifs_sem))
>
--
i.