Linux userland API discussions
 help / color / mirror / Atom feed
From: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
To: Ahmed Azeem <ahmed.azeem@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Sudeep Holla <sudeep.holla@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	linux-api@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Divin Raj <divin.raj@arm.com>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	Ashok Raj <ashok.raj@oss.qualcomm.com>,
	punita@qti.qualcomm.com, jonathan.cameron@oss.qualcomm.com
Subject: Re: [PATCH RFC 0/4] firmware: arm: Add Platform Fault Detection Interface support
Date: Fri, 20 Nov 2026 16:44:15 -0800	[thread overview]
Message-ID: <13d32bf7-7f74-4dc5-a875-671167149df9@oss.qualcomm.com> (raw)
In-Reply-To: <20261119-topics-ahmaze01-upstream-pfdi-rfc-v1-0-4772d18b9115@arm.com>

On 11/19/2026 7:36 AM, Ahmed Azeem wrote:
> Hi all,
> 
> This series proposes an arm64 driver for the Arm Platform Fault
> Detection
> Interface (PFDI), providing a common Linux interface for privileged
> userspace to discover and invoke firmware diagnostics.
> 
> We are posting this series as an RFC to seek community feedback on both
> the proposed Linux interface and the underlying firmware specification
> before the specification is finalized. This series and its validation
> use
> the PFDI 1.0 ALP0 specification [1]. The current public revision is PFDI
> 1.0 BET0 [2]. Feedback on the software integration will help identify
> any
> changes needed to align an upstream implementation with the evolving
> specification.
>
 
...

> 
> I would appreciate feedback on the specification's suitability for Linux
> integration, the proposed per-CPU ioctl ABI, the worker and hotplug
> model,
> and whether this belongs under drivers/firmware. In particular, is this
> the right scope for a common PFDI interface, and should error injection
> be exposed separately from normal diagnostic operations?
> 

Thanks for the RFC

I haven't read through the specs or code in great detail, but I thought I would send in my initial thoughts

Most of it comes from my experience developing/up-streaming a similar feature in my prior job at Intel called In Field Scan [1] / [2]. 

I think creating per-cpu threads just for this feature might be an overkill on a system with large core-counts. I think an alternate approach like below might work for this 

1. Drop the per-CPU kthreads and the cpuhp state; run each request on the target CPU when it arrives ... something like
cpus_read_lock();
if (!cpu_online(cpu) 
        ret = -ENODEV;
else
        ret = work_on_cpu(cpu, pfdi_op_fn, &req);   /* or smp_call_on_cpu() */
 cpus_read_unlock();

(IFS used an alternate cpu stopper mechanism as it had the additional responsibility of synchronizing sibling threads and related timing etc ... it might not be needed here )

2. Use one device with the CPU passed in the request, not <numcpu> device nodes. Use a single /dev/pfdi (or /dev/cpu_pfdi) and add a cpu field to each ioctl argument struct. That removes:
- the per-CPU miscdevice and pfdi_dev_data
- the per-CPU register/deregister on hotplug etc

(I will be away next week ...so my responses will be delayed)

[1] https://github.com/torvalds/linux/blob/master/drivers/platform/x86/intel/ifs/ifs.h
[2] https://www.kernel.org/doc/html/latest/arch/x86/ifs.html


Thanks
Jithu

      parent reply	other threads:[~2026-11-21  0:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 15:36 [PATCH RFC 0/4] firmware: arm: Add Platform Fault Detection Interface support Ahmed Azeem
2026-11-19 15:36 ` [PATCH RFC 1/4] uapi: firmware: arm: Add PFDI userspace ABI Ahmed Azeem
2026-11-19 21:35   ` Jonathan Cameron
2026-11-19 15:36 ` [PATCH RFC 2/4] firmware: arm: Add PFDI misc driver skeleton Ahmed Azeem
2026-11-19 15:36 ` [PATCH RFC 3/4] firmware: arm: Add PFDI run, result, and error injection support Ahmed Azeem
2026-11-19 15:36 ` [PATCH RFC 4/4] firmware: arm: Harden PFDI worker and hotplug handling Ahmed Azeem
2026-11-21  0:44 ` Jithu Joseph [this message]

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=13d32bf7-7f74-4dc5-a875-671167149df9@oss.qualcomm.com \
    --to=jithu.joseph@oss.qualcomm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=ahmed.azeem@arm.com \
    --cc=ashok.raj@oss.qualcomm.com \
    --cc=corbet@lwn.net \
    --cc=divin.raj@arm.com \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=punita@qti.qualcomm.com \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=sudeep.holla@kernel.org \
    /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