From: Stewart Smith <stewart@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Vipin K Parashar <vipin@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails
Date: Wed, 15 Feb 2017 16:01:58 +1100 [thread overview]
Message-ID: <87a89o9hdl.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <87a89qsyxd.fsf@concordia.ellerman.id.au>
Michael Ellerman <mpe@ellerman.id.au> writes:
> Vipin K Parashar <vipin@linux.vnet.ibm.com> writes:
>
>> OPAL returns OPAL_WRONG_STATE for XSCOM operations
>>
>> done to read any core FIR which is sleeping, offline.
>
> OK.
>
> Do we know why Linux is causing that to happen?
>
> It's also returned from many of the XIVE routines if we're in the wrong
> xive mode, all of which would indicate a fairly bad Linux bug.
>
> Also the skiboot patch which added WRONG_STATE for XSCOM ops did so
> explicitly so we could differentiate from other errors:
>
> commit 9c2d82394fd2303847cac4a665dee62556ca528a
> Author: Russell Currey <ruscur@russell.cc>
> AuthorDate: Mon Mar 21 12:00:00 2016 +1100
>
> xscom: Return OPAL_WRONG_STATE on XSCOM ops if CPU is asleep
>
> xscom_read and xscom_write return OPAL_SUCCESS if they worked, and
> OPAL_HARDWARE if they didn't. This doesn't provide information about why
> the operation failed, such as if the CPU happens to be asleep.
>
> This is specifically useful in error scanning, so if every CPU is being
> scanned for errors, sleeping CPUs likely aren't the cause of failures.
>
> So, return OPAL_WRONG_STATE in xscom_read and xscom_write if the CPU is
> sleeping.
>
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> Reviewed-by: Alistair Popple <alistair@popple.id.au>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
>
>
>
> So I'm still not convinced that quietly swallowing this error and
> mapping it to -EIO along with several of the other error codes is the
> right thing to do.
FWIW I agree - pretty limited cases where it should just be converted
into -EIO and passed on - probably *just* the debugfs interface to be honest.
--
Stewart Smith
OPAL Architect, IBM.
next prev parent reply other threads:[~2017-02-15 5:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 14:16 [PATCH] powernv/opal: Handle OPAL_WRONG_STATE error from OPAL fails Vipin K Parashar
2016-12-21 5:24 ` Mukesh Ojha
2017-01-27 0:17 ` Michael Ellerman
2017-01-27 6:48 ` Vipin K Parashar
2017-02-13 0:43 ` Michael Ellerman
2017-02-15 5:01 ` Stewart Smith [this message]
2017-02-15 20:12 ` Vipin K Parashar
2017-02-16 0:52 ` Stewart Smith
2017-02-20 5:03 ` Michael Ellerman
2017-02-23 3:52 ` Stewart Smith
2017-02-28 9:20 ` Vipin K Parashar
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=87a89o9hdl.fsf@linux.vnet.ibm.com \
--to=stewart@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=vipin@linux.vnet.ibm.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 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).