public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: arnd@arndb.de, linux-acpi@vger.kernel.org, rjw@rjwysocki.net,
	lv.zheng@intel.com, linaro-acpi@lists.linaro.org,
	patches@linaro.org
Subject: Re: [PATCH v7 1/2] Mailbox: Add support for Platform Communication Channel
Date: Tue, 16 Sep 2014 10:40:35 -0700	[thread overview]
Message-ID: <20140916174035.GT7960@sirena.org.uk> (raw)
In-Reply-To: <1410369619-2570-2-git-send-email-ashwin.chaugule@linaro.org>

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

On Wed, Sep 10, 2014 at 01:20:18PM -0400, Ashwin Chaugule wrote:

> ACPI 5.0+ spec defines a generic mode of communication
> between the OS and a platform such as the BMC. This medium
> (PCC) is typically used by CPPC (ACPI CPU Performance management),
> RAS (ACPI reliability protocol) and MPST (ACPI Memory power
> states).

This mostly looks good to me at a fairly high level, one small nit below
which I don't think should be a blocker to an initial merge but would be
good to fix.

Reviewed-by: Mark Brown <broonie@kernel.org>

> +static bool pcc_tx_done(struct mbox_chan *chan)
> +{
> +	struct acpi_pcct_subspace *pcct_ss = chan->con_priv;
> +	struct acpi_pcct_shared_memory *generic_comm_base =
> +		(struct acpi_pcct_shared_memory *) pcct_ss->base_address;
> +	u16 cmd_delay = pcct_ss->min_turnaround_time;
> +
> +	/* Wait for Platform to consume. */
> +	while (!(readw_relaxed(&generic_comm_base->status) & PCC_CMD_COMPLETE))
> +		udelay(cmd_delay);

This will busy wait for ever if the controller dies.  We're in big
trouble if that happens but it would be good to have some sort of
timeout and scream here.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2014-09-16 17:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 17:20 [PATCH v7 0/2] PCC: Platform Communication Channel Ashwin Chaugule
2014-09-10 17:20 ` [PATCH v7 1/2] Mailbox: Add support for " Ashwin Chaugule
2014-09-12 13:08   ` Ashwin Chaugule
2014-09-13 15:57     ` Mark Brown
2014-09-13 22:05       ` Ashwin Chaugule
2014-09-16  4:38         ` Zheng, Lv
2014-09-16 18:24           ` Ashwin Chaugule
2014-09-16 17:40   ` Mark Brown [this message]
2014-09-16 18:28     ` Ashwin Chaugule
2014-09-17 22:17       ` Ashwin Chaugule
2014-09-18 17:35         ` Mark Brown
2014-09-30 17:23         ` Ashwin Chaugule
2014-10-01 16:00           ` Mark Brown
2014-09-10 17:20 ` [PATCH v7 2/2] PCC test Ashwin Chaugule

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=20140916174035.GT7960@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ashwin.chaugule@linaro.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=patches@linaro.org \
    --cc=rjw@rjwysocki.net \
    /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