The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Chatradhi, Naveen Krishna" <naveenkrishna.chatradhi@amd.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Naveen Krishna Chatradhi <nchatrad@amd.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Akshay Gupta <Akshay.Gupta@amd.com>,
	arnd@arndb.de, lee@kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH 2/2] sbrmi: Add support for APML protocols
Date: Wed, 15 May 2024 00:45:19 +0530	[thread overview]
Message-ID: <8cf0d519-ae6c-4ed0-899e-899f67479052@amd.com> (raw)
In-Reply-To: <dd4ef0b6-8272-40b6-9a50-edbeec14d5e4@roeck-us.net>

+ @Misc and @MFD maintainers in CC

Hi

On 5/3/2024 3:56 AM, Guenter Roeck wrote:
> Caution: This message originated from an External Source. Use proper 
> caution when opening attachments, clicking links, or responding.
>
>
> On 5/2/24 15:05, Naveen Krishna Chatradhi wrote:
>> From: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
>>
>> The present sbrmi module only support reporting power. However, AMD data
>> center processors support various system management functionality
>> Out-of-band over Advanced Platform Management Link APML.
>>
>> Register a miscdevice, which creates a device /dev/sbrmiX with an IOCTL
>> interface for the user space to invoke the following protocols.
>>    - Mailbox read/write (already defined in sbrmi_mailbox_xfer())
>>    - CPUID read
>>    - MCAMSR read
>>
>
> This is not hardware monitoring functionality and would have to reside
> elsewhere, outside the hwmon subsystem.

I thought as much, please provide your opinion on the following approach.

Background: Present sbrmi under hwmon subsystem is probed as an i2c 
driver and reports power.

However, APML interface defines few other protocols to support OOB 
system management functionality.

As adding the core functionality of the APML interface in 
drivers/hwmon/sbrmi is not the correct approach.

We would like do the following

1. Move the i2c client probe, misc device registration and 
rmi_mailbox_xfer() function to a drivers/misc.

2. Add an MFD device with a cell, which probes the hwmon/sbrmi and 
continues to report power using the symbols exported by the misc/sbrmi.

3. Define an ioctl for user-space to access other system management 
functionality.

    a. The open-sourced https://github.com/amd/esmi_oob_library will 
continue to provide user space programmable API

Regards,

naveenk

>
> Guenter
>

       reply	other threads:[~2024-05-14 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240502220554.2768611-1-nchatrad@amd.com>
     [not found] ` <20240502220554.2768611-2-nchatrad@amd.com>
     [not found]   ` <dd4ef0b6-8272-40b6-9a50-edbeec14d5e4@roeck-us.net>
2024-05-14 19:15     ` Chatradhi, Naveen Krishna [this message]
2024-05-14 19:47       ` [PATCH 2/2] sbrmi: Add support for APML protocols Guenter Roeck
2024-05-15 10:32         ` Lee Jones
2024-05-15 11:30           ` Chatradhi, Naveen Krishna

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=8cf0d519-ae6c-4ed0-899e-899f67479052@amd.com \
    --to=naveenkrishna.chatradhi@amd.com \
    --cc=Akshay.Gupta@amd.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nchatrad@amd.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