powerpc/powernv: Fix endian issues with OPAL async code
OPAL defines opal_msg as a big endian struct so we have to byte swap it on little endian builds. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

szülő
32b941b793
commit
bb4398e1de
@@ -64,7 +64,7 @@ static int opal_get_sys_param(u32 param_id, u32 length, void *buffer)
|
||||
goto out_token;
|
||||
}
|
||||
|
||||
ret = msg.params[1];
|
||||
ret = be64_to_cpu(msg.params[1]);
|
||||
|
||||
out_token:
|
||||
opal_async_release_token(token);
|
||||
@@ -98,7 +98,7 @@ static int opal_set_sys_param(u32 param_id, u32 length, void *buffer)
|
||||
goto out_token;
|
||||
}
|
||||
|
||||
ret = msg.params[1];
|
||||
ret = be64_to_cpu(msg.params[1]);
|
||||
|
||||
out_token:
|
||||
opal_async_release_token(token);
|
||||
|
Reference in New Issue
Block a user