diff options
author | Anton Blanchard <anton@samba.org> | 2014-06-04 00:48:48 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-04 23:20:39 -0400 |
commit | 223ca9d855ce32a4cc2d2b961e6e9d1fb36872ba (patch) | |
tree | 2a3eeb3eda3d5b9c2f1bc7540ab8d776e63a7fa1 /arch/powerpc/include/asm/opal.h | |
parent | 2213fb142f1fff1ac28868d196294ca4423659af (diff) |
powerpc/powernv: Fix endian issues in memory error handling code
struct OpalMemoryErrorData is passed to us from firmware, so we
have to byteswap it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/opal.h')
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index ea8bba7b66bd..cb15cbb51600 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h | |||
@@ -510,7 +510,7 @@ enum OpalMemErr_DynErrType { | |||
510 | struct OpalMemoryErrorData { | 510 | struct OpalMemoryErrorData { |
511 | enum OpalMemErr_Version version:8; /* 0x00 */ | 511 | enum OpalMemErr_Version version:8; /* 0x00 */ |
512 | enum OpalMemErrType type:8; /* 0x01 */ | 512 | enum OpalMemErrType type:8; /* 0x01 */ |
513 | uint16_t flags; /* 0x02 */ | 513 | __be16 flags; /* 0x02 */ |
514 | uint8_t reserved_1[4]; /* 0x04 */ | 514 | uint8_t reserved_1[4]; /* 0x04 */ |
515 | 515 | ||
516 | union { | 516 | union { |
@@ -518,15 +518,15 @@ struct OpalMemoryErrorData { | |||
518 | struct { | 518 | struct { |
519 | enum OpalMemErr_ResilErrType resil_err_type:8; | 519 | enum OpalMemErr_ResilErrType resil_err_type:8; |
520 | uint8_t reserved_1[7]; | 520 | uint8_t reserved_1[7]; |
521 | uint64_t physical_address_start; | 521 | __be64 physical_address_start; |
522 | uint64_t physical_address_end; | 522 | __be64 physical_address_end; |
523 | } resilience; | 523 | } resilience; |
524 | /* Dynamic memory deallocation error info */ | 524 | /* Dynamic memory deallocation error info */ |
525 | struct { | 525 | struct { |
526 | enum OpalMemErr_DynErrType dyn_err_type:8; | 526 | enum OpalMemErr_DynErrType dyn_err_type:8; |
527 | uint8_t reserved_1[7]; | 527 | uint8_t reserved_1[7]; |
528 | uint64_t physical_address_start; | 528 | __be64 physical_address_start; |
529 | uint64_t physical_address_end; | 529 | __be64 physical_address_end; |
530 | } dyn_dealloc; | 530 | } dyn_dealloc; |
531 | } u; | 531 | } u; |
532 | }; | 532 | }; |