From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Revert "powerpc/powernv: Fix endian bug in LPC bus debugfs accessors"
Date: Tue, 28 Oct 2014 14:53:06 +1100 [thread overview]
Message-ID: <1414468386.364.212.camel@pasglop> (raw)
In-Reply-To: <1414458920-7166-1-git-send-email-mpe@ellerman.id.au>
On Tue, 2014-10-28 at 12:15 +1100, Michael Ellerman wrote:
> This reverts commit bf7588a0859580a45c63cb082825d77c13eca357.
>
> Ben says, "The original code was fine, I think the bug was actually in
> the userspace tool I was using (don't worry, nothing on the field uses
> that interface yet and I can still fix the tool)."
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
The original code wasn't fine actually :-) But the fix was completely
wrong and does more damages than it fixes things. So Ack the revert and
I'll sort things out properly later.
Cheers,
Ben.
> ---
> arch/powerpc/platforms/powernv/opal-lpc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/opal-lpc.c b/arch/powerpc/platforms/powernv/opal-lpc.c
> index dd2c285ad170..ad4b31df779a 100644
> --- a/arch/powerpc/platforms/powernv/opal-lpc.c
> +++ b/arch/powerpc/platforms/powernv/opal-lpc.c
> @@ -191,7 +191,6 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
> {
> struct lpc_debugfs_entry *lpc = filp->private_data;
> u32 data, pos, len, todo;
> - __be32 bedata;
> int rc;
>
> if (!access_ok(VERIFY_WRITE, ubuf, count))
> @@ -214,10 +213,9 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
> len = 2;
> }
> rc = opal_lpc_read(opal_lpc_chip_id, lpc->lpc_type, pos,
> - &bedata, len);
> + &data, len);
> if (rc)
> return -ENXIO;
> - data = be32_to_cpu(bedata);
> switch(len) {
> case 4:
> rc = __put_user((u32)data, (u32 __user *)ubuf);
prev parent reply other threads:[~2014-10-28 3:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 1:15 [PATCH] Revert "powerpc/powernv: Fix endian bug in LPC bus debugfs accessors" Michael Ellerman
2014-10-28 3:53 ` Benjamin Herrenschmidt [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=1414468386.364.212.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).