linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Stewart Smith <stewart@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: 蒲文 <wen.pu@powercore.com.cn>
Subject: Re: [PATCH] powerpc/powernv: pr_warn_once on unsupported OPAL_MSG type
Date: Fri, 11 Dec 2015 13:21:05 +1100	[thread overview]
Message-ID: <1449800465.21866.6.camel@ellerman.id.au> (raw)
In-Reply-To: <1449796103-7700-1-git-send-email-stewart@linux.vnet.ibm.com>

On Fri, 2015-12-11 at 12:08 +1100, Stewart Smith wrote:
> When running on newer OPAL firmware that supports sending extra
> OPAL_MSG types, we would print a warning on *every* message received.
> 
> This could be a problem for kernels that don't support OPAL_MSG_OCC
> on machines that are running real close to thermal limits and the
> OCC is throttling the chip. For a kernel that is paying attention to
> the message queue, we could get these notifications quite often.
> 
> Conceivably, future message types could also come fairly often,
> and printing that we didn't understand them 10,000 times provides
> no further information than printing them once.
> 
> diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
> index 4296d55e88f3..57cffb80bc36 100644
> --- a/arch/powerpc/platforms/powernv/opal.c
> +++ b/arch/powerpc/platforms/powernv/opal.c
> @@ -278,7 +278,7 @@ static void opal_handle_message(void)
>  
>  	/* Sanity check */
>  	if (type >= OPAL_MSG_TYPE_MAX) {
> -		pr_warning("%s: Unknown message type: %u\n", __func__, type);
> +		pr_warn_once("%s: Unknown message type: %u\n", __func__, type);
>  		return;

This will only print once, even if there are multiple unknown message types,
are we happy with that?

cheers

  reply	other threads:[~2015-12-11  2:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11  1:08 [PATCH] powerpc/powernv: pr_warn_once on unsupported OPAL_MSG type Stewart Smith
2015-12-11  2:21 ` Michael Ellerman [this message]
2015-12-11  2:43   ` Wen Pu
2015-12-11  6:54   ` Stewart Smith
2015-12-17 10:19 ` Michael Ellerman

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=1449800465.21866.6.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=stewart@linux.vnet.ibm.com \
    --cc=wen.pu@powercore.com.cn \
    /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;
as well as URLs for NNTP newsgroup(s).