Re: [PATCH v2] platform/x86/amd/pmc: Add AMD MP2 STB functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Feb 2024, Basavaraj Natikar wrote:

> 
> On 2/27/2024 4:18 PM, Ilpo Järvinen wrote:
> > On Mon, 26 Feb 2024, Basavaraj Natikar wrote:
> >
> >> AMD MP2 STB function provides a data buffer used to log debug information
> >> about the system execution during S2Idle suspend/resume.
> >>
> >> A data buffer known as the STB (Smart Trace Buffer) is a circular buffer
> >> which is a low-level log to assist in debugging by providing insights
> >> into any potential hangs or stalls that may occur during the S2Idle
> >> suspend/resume processes.
> >>
> >> The current PMC driver retrieves STB data from MP1, but there can be
> >> scenarios where MP1 might hang or become unresponsive, leading to the
> >> loss of critical data present in the STB buffer. This defeats the purpose
> >> of the STB buffer, which was originally meant to help identify system
> >> failures.
> >>
> >> This feature creates stb_read_previous_boot debugfs allows users to
> >> retrieve the STB log from MP2 specifically from the last occurrence of
> >> the S2Idle suspend/resume. A userspace daemon can access STB log of last
> >> S2Idle suspend/resume which can help to troubleshoot potential issues
> >> related to hangs or stalls during the S2Idle suspend/resume sequence.
> >>
> >> Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@xxxxxxx>
> >> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@xxxxxxx>


> >> +{
> >> +	struct mp2_cmd_base cmd_base;
> >> +
> >> +	cmd_base.ul = 0;
> >> +	cmd_base.cmd.cmd_id = cmd_id;
> >> +	cmd_base.cmd.intr_disable = 1;
> >> +	cmd_base.cmd.dma_addr = da;
> >> +
> >> +	writeq(mp2->dma_addr, mp2->mmio + AMD_C2P_MSG1);
> >> +	writel(cmd_base.ul, mp2->mmio + AMD_C2P_MSG0);
> > Please add the #include for writeq() and writel() like I already told you.
> 
> Do you mean to add #include <asm/io.h>?

That or <linux/io.h> which includes the asm one.


-- 
 i.

[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux