<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/misc/amd-sbi, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-22T06:02:57+00:00</updated>
<entry>
<title>misc: amd-sbi: Clarify that this is a BMC driver</title>
<updated>2025-10-22T06:02:57+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2025-10-16T13:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=70ad06df73a9796026b197d84ead751e096618c7'/>
<id>urn:sha1:70ad06df73a9796026b197d84ead751e096618c7</id>
<content type='text'>
Add a sentence to the driver description to clarify that the sbrmi-i2c
driver is intended to run on the BMC and not on the managed node. Add
platform dependencies accordingly.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Link: https://lore.kernel.org/r/5c9f7100-0e59-4237-a252-43c3ee4802a2@amd.com
Link: https://patch.msgid.link/20251016155040.0e86c102@endymion
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/misc/amd-sbi/Kconfig: select REGMAP_I2C</title>
<updated>2025-09-06T14:00:50+00:00</updated>
<author>
<name>Max Kellermann</name>
<email>max.kellermann@ionos.com</email>
</author>
<published>2025-08-29T09:14:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f8f84e286f11af4c954c14a57daffc80a1c3510'/>
<id>urn:sha1:5f8f84e286f11af4c954c14a57daffc80a1c3510</id>
<content type='text'>
Without CONFIG_REGMAP, rmi-i2c.c fails to build because struct
regmap_config is not defined:

 drivers/misc/amd-sbi/rmi-i2c.c: In function ‘sbrmi_i2c_probe’:
 drivers/misc/amd-sbi/rmi-i2c.c:57:16: error: variable ‘sbrmi_i2c_regmap_config’ has initializer but incomplete type
    57 |         struct regmap_config sbrmi_i2c_regmap_config = {
       |                ^~~~~~~~~~~~~

Additionally, CONFIG_REGMAP_I2C is needed for devm_regmap_init_i2c():

 ld: drivers/misc/amd-sbi/rmi-i2c.o: in function `sbrmi_i2c_probe':
 drivers/misc/amd-sbi/rmi-i2c.c:69:(.text+0x1c0): undefined reference to `__devm_regmap_init_i2c'

Fixes: 013f7e7131bd ("misc: amd-sbi: Use regmap subsystem")
Cc: stable@vger.kernel.org
Signed-off-by: Max Kellermann &lt;max.kellermann@ionos.com&gt;
Tested-by: Akshay Gupta &lt;Akshay.Gupta@amd.com&gt;
Reviewed-by: Akshay Gupta &lt;Akshay.Gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250829091442.1112106-1-max.kellermann@ionos.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Explicitly clear in/out arg "mb_in_out"</title>
<updated>2025-07-16T13:02:45+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-07-16T11:07:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16ad3ee51fc95ae8e06b9934fa2f656a5e4a8f03'/>
<id>urn:sha1:16ad3ee51fc95ae8e06b9934fa2f656a5e4a8f03</id>
<content type='text'>
- New AMD processor will support different input/output for same command.
- In some scenarios the input value is not cleared, which will be added to
  output before reporting the data.
- Clearing input explicitly will be a cleaner and safer approach.

Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250716110729.2193725-3-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Address copy_to/from_user() warning reported in smatch</title>
<updated>2025-07-16T13:02:45+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-07-16T11:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbb4013947fa5d9b2a65efdbfb08020abb060a18'/>
<id>urn:sha1:bbb4013947fa5d9b2a65efdbfb08020abb060a18</id>
<content type='text'>
Smatch warnings are reported for below commit,

Commit bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol")
from Apr 28, 2025 (linux-next), leads to the following Smatch static
checker warning:

drivers/misc/amd-sbi/rmi-core.c:376 apml_rmi_reg_xfer() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/misc/amd-sbi/rmi-core.c:394 apml_mailbox_xfer() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/misc/amd-sbi/rmi-core.c:411 apml_cpuid_xfer() warn: maybe return -EFAULT instead of the bytes remaining?
drivers/misc/amd-sbi/rmi-core.c:428 apml_mcamsr_xfer() warn: maybe return -EFAULT instead of the bytes remaining?

copy_to/from_user() returns number of bytes, not copied.
In case data not copied, return "-EFAULT".
Additionally, fixes the "-EPROTOTYPE" error return as intended.

Fixes: 35ac2034db72 ("misc: amd-sbi: Add support for AMD_SBI IOCTL")
Fixes: bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol")
Fixes: 69b1ba83d21c ("misc: amd-sbi: Add support for read MCA register protocol")
Fixes: cf141287b774 ("misc: amd-sbi: Add support for register xfer")
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Closes: https://lore.kernel.org/all/aDVyO8ByVsceybk9@stanley.mountain/
Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250716110729.2193725-2-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Address potential integer overflow issue reported in smatch</title>
<updated>2025-07-16T13:02:45+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-07-16T11:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e108b0a5d339aca9661cd93eb4258b2c661e11e8'/>
<id>urn:sha1:e108b0a5d339aca9661cd93eb4258b2c661e11e8</id>
<content type='text'>
Smatch warnings are reported for below commit,

Commit bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol")
from Apr 28, 2025 (linux-next), leads to the following Smatch static
checker warning:

drivers/misc/amd-sbi/rmi-core.c:132 rmi_cpuid_read() warn: bitwise OR is zero '0xffffffff00000000 &amp; 0xffff'
drivers/misc/amd-sbi/rmi-core.c:132 rmi_cpuid_read() warn: potential integer overflow from user 'msg-&gt;cpu_in_out &lt;&lt; 32'
drivers/misc/amd-sbi/rmi-core.c:213 rmi_mca_msr_read() warn: bitwise OR is zero '0xffffffff00000000 &amp; 0xffff'
drivers/misc/amd-sbi/rmi-core.c:213 rmi_mca_msr_read() warn: potential integer overflow from user 'msg-&gt;mcamsr_in_out &lt;&lt; 32'

CPUID &amp; MCAMSR thread data from input is available at byte 4 &amp; 5, this
patch fixes to copy the user data correctly in the argument.
Previously, CPUID and MCAMSR data is return only for thread 0.

Fixes: bb13a84ed6b7 ("misc: amd-sbi: Add support for CPUID protocol")
Fixes: 69b1ba83d21c ("misc: amd-sbi: Add support for read MCA register protocol")
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Closes: https://lore.kernel.org/all/aDVyO8ByVsceybk9@stanley.mountain/
Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250716110729.2193725-1-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Add support for register xfer</title>
<updated>2025-05-21T12:44:41+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-04-28T06:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf141287b77485ed7624ac1756b85cc801748c7c'/>
<id>urn:sha1:cf141287b77485ed7624ac1756b85cc801748c7c</id>
<content type='text'>
- Provide user register access over IOCTL.
  Both register read and write are supported.
- APML interface does not provide a synchronization method. By defining,
  a register access path, we use APML modules and library for
  all APML transactions. Without having to use external tools such as
  i2c-tools, which may cause race conditions.

Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250428063034.2145566-10-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Add support for read MCA register protocol</title>
<updated>2025-05-21T12:44:41+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-04-28T06:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69b1ba83d21c4a89f6fcfbca1d515a60df65cf9e'/>
<id>urn:sha1:69b1ba83d21c4a89f6fcfbca1d515a60df65cf9e</id>
<content type='text'>
- AMD provides custom protocol to read Machine Check Architecture(MCA)
  registers over sideband. The information is accessed for range of
  MCA registers by passing register address and thread ID to the protocol.
  MCA register read command using the register address to access
  Core::X86::Msr::MCG_CAP which determines the number of MCA banks.
  Access is read-only

Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250428063034.2145566-9-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Add support for CPUID protocol</title>
<updated>2025-05-21T12:44:40+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-04-28T06:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb13a84ed6b78200952b264b4d7a024b730e8246'/>
<id>urn:sha1:bb13a84ed6b78200952b264b4d7a024b730e8246</id>
<content type='text'>
- AMD provides custom protocol to read Processor feature
  capabilities and configuration information through side band.
  The information is accessed by providing CPUID Function,
  extended function and thread ID to the protocol.
  Undefined function returns 0.

Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250428063034.2145566-8-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Add support for AMD_SBI IOCTL</title>
<updated>2025-05-21T12:44:40+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-04-28T06:30:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35ac2034db72bbbc73609aab5f05ff6e0d38fdd0'/>
<id>urn:sha1:35ac2034db72bbbc73609aab5f05ff6e0d38fdd0</id>
<content type='text'>
The present sbrmi module only support reporting power via hwmon.
However, AMD data center range of processors support various
system management functionality using custom protocols defined in
Advanced Platform Management Link (APML) specification.

Register a miscdevice, which creates a device /dev/sbrmiX with an IOCTL
interface for the user space to invoke the APML Mailbox protocol, which
is already defined in sbrmi_mailbox_xfer().

The APML protocols depend on a set of RMI registers. Having an IOCTL
as a single entry point will help in providing synchronization among
these protocols as multiple transactions on RMI register set may
create race condition.
Support for other protocols will be added in subsequent patches.

APML mailbox protocol returns additional error codes written by
SMU firmware in the out-bound register 0x37. These errors include,
invalid core, message not supported over platform and
others. This additional error codes can be used to provide more
details to user space.

Open-sourced and widely used https://github.com/amd/esmi_oob_library
will continue to provide user-space programmable API.

Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250428063034.2145566-7-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: amd-sbi: Optimize the wait condition for mailbox command completion</title>
<updated>2025-05-21T12:44:40+00:00</updated>
<author>
<name>Akshay Gupta</name>
<email>akshay.gupta@amd.com</email>
</author>
<published>2025-04-28T06:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=587d2c625146c7ff62325ebb9a8668e666400dc4'/>
<id>urn:sha1:587d2c625146c7ff62325ebb9a8668e666400dc4</id>
<content type='text'>
- optimize the wait condition to indicate command completion
  by replacing the do while loop with regmap subsystem API
  regmap_read_poll_timeout()

Reviewed-by: Naveen Krishna Chatradhi &lt;naveenkrishna.chatradhi@amd.com&gt;
Signed-off-by: Akshay Gupta &lt;akshay.gupta@amd.com&gt;
Link: https://lore.kernel.org/r/20250428063034.2145566-6-akshay.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
