All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Nathan Lynch <ntl@pobox.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] check for GIQ indicator before calling set-indicator
Date: Sat, 13 Dec 2008 14:22:55 -0600	[thread overview]
Message-ID: <fc002fa9fb49e710793097c3d5b3010b@bga.com> (raw)
In-Reply-To: <1229022865-14993-1-git-send-email-ntl@pobox.com>

On Dec 11, 2008, at 1:14 PM, Nathan Lynch wrote:

> Since "Factor out cpu joining/unjoining the GIQ"
> (b4963255ad5a426f04a0bb15c4315fa4bb40cde9) the WARN_ON in
> xics_set_cpu_giq() is being triggered during boot on JS20 because the
> GIQ indicator is not available on that platform.  While the warning is
> harmless and the system runs normally, it's nicer to check for the
> existence of the indicator before trying to manipulate it.
>
> Implement rtas_indicator_present(), which searches the
> /rtas/rtas-indicators property for the given indicator token, and use
> this function in xics_set_cpu_giq().
>
> Also use a WARN statement in xics_set_cpu_giq to get better
> information on failure.
>
> Signed-off-by: Nathan Lynch <ntl@pobox.com>

Acked-By: Milton Miller <miltonm@bga.com>

...
> diff --git a/arch/powerpc/platforms/pseries/xics.c 
> b/arch/powerpc/platforms/pseries/xics.c
> index e190477..37f5986 100644
> --- a/arch/powerpc/platforms/pseries/xics.c
> +++ b/arch/powerpc/platforms/pseries/xics.c
> @@ -728,9 +728,18 @@ static void xics_set_cpu_priority(unsigned char 
> cppr)
>  /* Have the calling processor join or leave the specified global 
> queue */
>  static void xics_set_cpu_giq(unsigned int gserver, unsigned int join)
>  {
> -	int status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
> -		(1UL << interrupt_server_size) - 1 - gserver, join);
> -	WARN_ON(status < 0);
> +	int index;
> +	int status;
> +
> +	if (!rtas_indicator_present(GLOBAL_INTERRUPT_QUEUE, NULL))
> +		return;
> +
> +	index = (1UL << interrupt_server_size) - 1 - gserver;
> +
> +	status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE, index, 
> join);
> +
> +	WARN(status < 0, "set-indicator(%d, %d, %u) returned %d\n",
> +	     GLOBAL_INTERRUPT_QUEUE, index, join, status);
>  }
>
>  void xics_setup_cpu(void)
> -- 
> 1.5.5
>

      reply	other threads:[~2008-12-13 20:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22  3:06 badness in xics_set_cpu_giq on JS20 blade Nathan Lynch
2008-11-22 16:30 ` Milton Miller
2008-11-23  0:26   ` Nathan Lynch
2008-11-25 16:31     ` Milton Miller
2008-12-11 19:14       ` [PATCH] check for GIQ indicator before calling set-indicator Nathan Lynch
2008-12-13 20:22         ` Milton Miller [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=fc002fa9fb49e710793097c3d5b3010b@bga.com \
    --to=miltonm@bga.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ntl@pobox.com \
    /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.