All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Basavaraj Natikar <bnatikar@amd.com>
Cc: Basavaraj Natikar <Basavaraj.Natikar@amd.com>,
	Shyam-sundar.S-k@amd.com,  Hans de Goede <hdegoede@redhat.com>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v2] platform/x86/amd/pmc: Add AMD MP2 STB functionality
Date: Thu, 29 Feb 2024 13:25:15 +0200 (EET)	[thread overview]
Message-ID: <3bd2b386-3047-e057-486b-7f7da0f64ce0@linux.intel.com> (raw)
In-Reply-To: <a17f71c1-0084-4c64-b765-2f305662dc87@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

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@amd.com>
> >> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>


> >> +{
> >> +	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.

      reply	other threads:[~2024-02-29 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 15:13 [PATCH v2] platform/x86/amd/pmc: Add AMD MP2 STB functionality Basavaraj Natikar
2024-02-26 18:18 ` Kuppuswamy Sathyanarayanan
2024-02-28 10:46   ` Basavaraj Natikar
2024-02-27 10:48 ` Ilpo Järvinen
2024-02-28 10:48   ` Basavaraj Natikar
2024-02-29 11:25     ` Ilpo Järvinen [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=3bd2b386-3047-e057-486b-7f7da0f64ce0@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=bnatikar@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=platform-driver-x86@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.