提交 bf19edd2 编写于 作者: M Michael Ellerman

Revert "powerpc/powernv: Fix endian bug in LPC bus debugfs accessors"

This reverts commit bf7588a0.

Ben says although the code is not correct "[this] fix was completely
wrong and does more damages than it fixes things."
Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 19d36c21
...@@ -191,7 +191,6 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf, ...@@ -191,7 +191,6 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
{ {
struct lpc_debugfs_entry *lpc = filp->private_data; struct lpc_debugfs_entry *lpc = filp->private_data;
u32 data, pos, len, todo; u32 data, pos, len, todo;
__be32 bedata;
int rc; int rc;
if (!access_ok(VERIFY_WRITE, ubuf, count)) if (!access_ok(VERIFY_WRITE, ubuf, count))
...@@ -214,10 +213,9 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf, ...@@ -214,10 +213,9 @@ static ssize_t lpc_debug_read(struct file *filp, char __user *ubuf,
len = 2; len = 2;
} }
rc = opal_lpc_read(opal_lpc_chip_id, lpc->lpc_type, pos, rc = opal_lpc_read(opal_lpc_chip_id, lpc->lpc_type, pos,
&bedata, len); &data, len);
if (rc) if (rc)
return -ENXIO; return -ENXIO;
data = be32_to_cpu(bedata);
switch(len) { switch(len) {
case 4: case 4:
rc = __put_user((u32)data, (u32 __user *)ubuf); rc = __put_user((u32)data, (u32 __user *)ubuf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册