stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Sam Mendoza-Jonas <sam@mendozajonas.com>, linuxppc-dev@ozlabs.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	"# 4 . 1 . x-" <stable@vger.kernel.org>,
	Alistair Popple <alistair@popple.id.au>,
	Samuel Mendoza-Jonas <sam@mendozajonas.com>
Subject: Re: [2/2] tty/hvc: Use opal irqchip interface if available
Date: Tue,  5 Jul 2016 15:31:42 +1000 (AEST)	[thread overview]
Message-ID: <3rkCDZ1WWTz9sBc@ozlabs.org> (raw)
In-Reply-To: <20160628031139.12500-2-sam@mendozajonas.com>

On Tue, 2016-28-06 at 03:11:39 UTC, Sam Mendoza-Jonas wrote:
> diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
> index b7cd0ae..8c53f5b 100644
> --- a/drivers/tty/hvc/hvc_opal.c
> +++ b/drivers/tty/hvc/hvc_opal.c
> @@ -214,7 +216,15 @@ static int hvc_opal_probe(struct platform_device *dev)
>  		dev->dev.of_node->full_name,
>  		boot ? " (boot console)" : "");
>  
> -	irq = opal_event_request(ilog2(OPAL_EVENT_CONSOLE_INPUT));
> +	rc = of_property_read_u32(dev->dev.of_node, "interrupts", &prop);
> +	if (rc) {
> +		pr_info("hvc%d: No interrupts property, using OPAL event\n",
> +				termno);
> +		irq = opal_event_request(ilog2(OPAL_EVENT_CONSOLE_INPUT));
> +	} else {
> +		irq = irq_of_parse_and_map(dev->dev.of_node, 0);
> +	}

That seems a bit backward.

Shouldn't we try irq_of_parse_and_map() and if that fails, then we go back to
opal_event_request() ?

cheers

  parent reply	other threads:[~2016-07-05  5:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  3:11 [PATCH 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles Samuel Mendoza-Jonas
2016-06-28  3:11 ` [PATCH 2/2] tty/hvc: Use opal irqchip interface if available Samuel Mendoza-Jonas
2016-06-28  3:34   ` Benjamin Herrenschmidt
2016-06-28  3:35     ` Benjamin Herrenschmidt
2016-07-05  5:31   ` Michael Ellerman [this message]
2016-07-05  6:07     ` [2/2] " Samuel Mendoza-Jonas
2016-07-05  5:34 ` [1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles 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=3rkCDZ1WWTz9sBc@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=alistair@popple.id.au \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sam@mendozajonas.com \
    --cc=stable@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 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).