aboutsummaryrefslogtreecommitdiff
path: root/core/opal.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-09 17:22:10 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-09 17:23:03 +1100
commit91570c1a7235af5545b8fee9a5c62e3908aad895 (patch)
tree502249000006b34620ea777a74c98412f23bcf4f /core/opal.c
parent6e80b996ff374cd0e6b647db63de234180306b6a (diff)
downloadskiboot-91570c1a7235af5545b8fee9a5c62e3908aad895.zip
skiboot-91570c1a7235af5545b8fee9a5c62e3908aad895.tar.gz
skiboot-91570c1a7235af5545b8fee9a5c62e3908aad895.tar.bz2
Fix sparse warnings in opal_trace_entry()
Need to flip things appropriately for endian annotations No actual functional changes since skiboot is still BE, but we're a bit more explicit about the fact the ABI is BE. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/opal.c')
-rw-r--r--core/opal.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/opal.c b/core/opal.c
index 04e2283..b6411f0 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -81,7 +81,7 @@ void opal_trace_entry(struct stack_frame *eframe);
void opal_trace_entry(struct stack_frame *eframe)
{
union trace t;
- unsigned nargs;
+ unsigned nargs, i;
if (this_cpu()->pir != mfspr(SPR_PIR)) {
printf("CPU MISMATCH ! PIR=%04lx cpu @%p -> pir=%04x\n",
@@ -93,10 +93,11 @@ void opal_trace_entry(struct stack_frame *eframe)
else
nargs = opal_num_args[eframe->gpr[0]];
- t.opal.token = eframe->gpr[0];
- t.opal.lr = eframe->lr;
- t.opal.sp = eframe->gpr[1];
- memcpy(t.opal.r3_to_11, &eframe->gpr[3], nargs*sizeof(u64));
+ t.opal.token = cpu_to_be64(eframe->gpr[0]);
+ t.opal.lr = cpu_to_be64(eframe->lr);
+ t.opal.sp = cpu_to_be64(eframe->gpr[1]);
+ for(i=0; i<nargs; i++)
+ t.opal.r3_to_11[i] = cpu_to_be64(eframe->gpr[3+i]);
trace_add(&t, TRACE_OPAL, offsetof(struct trace_opal, r3_to_11[nargs]));
}