aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorGuo Chao <yan@linux.vnet.ibm.com>2014-06-09 04:58:51 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-06-11 03:03:23 -0400
commitddf0322a3ffe2d98facc72f255ac5c140b547c72 (patch)
tree72c1e1a794a0b2363e8053617accb9c306d04777 /arch/powerpc/include/asm
parent8b9f9269bcfb4fe9b44bb52aac1ce796834109fe (diff)
powerpc/powernv: Fix endianness problems in EEH
EEH information fetched from OPAL need fix before using in LE environment. To be included in sparse's endian check, declare them as __beXX and access them by accessors. Cc: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/opal.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index cb15cbb51600..460018889ba9 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -599,9 +599,9 @@ enum {
599}; 599};
600 600
601struct OpalIoPhbErrorCommon { 601struct OpalIoPhbErrorCommon {
602 uint32_t version; 602 __be32 version;
603 uint32_t ioType; 603 __be32 ioType;
604 uint32_t len; 604 __be32 len;
605}; 605};
606 606
607struct OpalIoP7IOCPhbErrorData { 607struct OpalIoP7IOCPhbErrorData {
@@ -666,64 +666,64 @@ struct OpalIoP7IOCPhbErrorData {
666struct OpalIoPhb3ErrorData { 666struct OpalIoPhb3ErrorData {
667 struct OpalIoPhbErrorCommon common; 667 struct OpalIoPhbErrorCommon common;
668 668
669 uint32_t brdgCtl; 669 __be32 brdgCtl;
670 670
671 /* PHB3 UTL regs */ 671 /* PHB3 UTL regs */
672 uint32_t portStatusReg; 672 __be32 portStatusReg;
673 uint32_t rootCmplxStatus; 673 __be32 rootCmplxStatus;
674 uint32_t busAgentStatus; 674 __be32 busAgentStatus;
675 675
676 /* PHB3 cfg regs */ 676 /* PHB3 cfg regs */
677 uint32_t deviceStatus; 677 __be32 deviceStatus;
678 uint32_t slotStatus; 678 __be32 slotStatus;
679 uint32_t linkStatus; 679 __be32 linkStatus;
680 uint32_t devCmdStatus; 680 __be32 devCmdStatus;
681 uint32_t devSecStatus; 681 __be32 devSecStatus;
682 682
683 /* cfg AER regs */ 683 /* cfg AER regs */
684 uint32_t rootErrorStatus; 684 __be32 rootErrorStatus;
685 uint32_t uncorrErrorStatus; 685 __be32 uncorrErrorStatus;
686 uint32_t corrErrorStatus; 686 __be32 corrErrorStatus;
687 uint32_t tlpHdr1; 687 __be32 tlpHdr1;
688 uint32_t tlpHdr2; 688 __be32 tlpHdr2;
689 uint32_t tlpHdr3; 689 __be32 tlpHdr3;
690 uint32_t tlpHdr4; 690 __be32 tlpHdr4;
691 uint32_t sourceId; 691 __be32 sourceId;
692 692
693 uint32_t rsv3; 693 __be32 rsv3;
694 694
695 /* Record data about the call to allocate a buffer */ 695 /* Record data about the call to allocate a buffer */
696 uint64_t errorClass; 696 __be64 errorClass;
697 uint64_t correlator; 697 __be64 correlator;
698 698
699 uint64_t nFir; /* 000 */ 699 __be64 nFir; /* 000 */
700 uint64_t nFirMask; /* 003 */ 700 __be64 nFirMask; /* 003 */
701 uint64_t nFirWOF; /* 008 */ 701 __be64 nFirWOF; /* 008 */
702 702
703 /* PHB3 MMIO Error Regs */ 703 /* PHB3 MMIO Error Regs */
704 uint64_t phbPlssr; /* 120 */ 704 __be64 phbPlssr; /* 120 */
705 uint64_t phbCsr; /* 110 */ 705 __be64 phbCsr; /* 110 */
706 uint64_t lemFir; /* C00 */ 706 __be64 lemFir; /* C00 */
707 uint64_t lemErrorMask; /* C18 */ 707 __be64 lemErrorMask; /* C18 */
708 uint64_t lemWOF; /* C40 */ 708 __be64 lemWOF; /* C40 */
709 uint64_t phbErrorStatus; /* C80 */ 709 __be64 phbErrorStatus; /* C80 */
710 uint64_t phbFirstErrorStatus; /* C88 */ 710 __be64 phbFirstErrorStatus; /* C88 */
711 uint64_t phbErrorLog0; /* CC0 */ 711 __be64 phbErrorLog0; /* CC0 */
712 uint64_t phbErrorLog1; /* CC8 */ 712 __be64 phbErrorLog1; /* CC8 */
713 uint64_t mmioErrorStatus; /* D00 */ 713 __be64 mmioErrorStatus; /* D00 */
714 uint64_t mmioFirstErrorStatus; /* D08 */ 714 __be64 mmioFirstErrorStatus; /* D08 */
715 uint64_t mmioErrorLog0; /* D40 */ 715 __be64 mmioErrorLog0; /* D40 */
716 uint64_t mmioErrorLog1; /* D48 */ 716 __be64 mmioErrorLog1; /* D48 */
717 uint64_t dma0ErrorStatus; /* D80 */ 717 __be64 dma0ErrorStatus; /* D80 */
718 uint64_t dma0FirstErrorStatus; /* D88 */ 718 __be64 dma0FirstErrorStatus; /* D88 */
719 uint64_t dma0ErrorLog0; /* DC0 */ 719 __be64 dma0ErrorLog0; /* DC0 */
720 uint64_t dma0ErrorLog1; /* DC8 */ 720 __be64 dma0ErrorLog1; /* DC8 */
721 uint64_t dma1ErrorStatus; /* E00 */ 721 __be64 dma1ErrorStatus; /* E00 */
722 uint64_t dma1FirstErrorStatus; /* E08 */ 722 __be64 dma1FirstErrorStatus; /* E08 */
723 uint64_t dma1ErrorLog0; /* E40 */ 723 __be64 dma1ErrorLog0; /* E40 */
724 uint64_t dma1ErrorLog1; /* E48 */ 724 __be64 dma1ErrorLog1; /* E48 */
725 uint64_t pestA[OPAL_PHB3_NUM_PEST_REGS]; 725 __be64 pestA[OPAL_PHB3_NUM_PEST_REGS];
726 uint64_t pestB[OPAL_PHB3_NUM_PEST_REGS]; 726 __be64 pestB[OPAL_PHB3_NUM_PEST_REGS];
727}; 727};
728 728
729enum { 729enum {
@@ -851,8 +851,8 @@ int64_t opal_pci_mask_pe_error(uint64_t phb_id, uint16_t pe_number, uint8_t erro
851int64_t opal_set_slot_led_status(uint64_t phb_id, uint64_t slot_id, uint8_t led_type, uint8_t led_action); 851int64_t opal_set_slot_led_status(uint64_t phb_id, uint64_t slot_id, uint8_t led_type, uint8_t led_action);
852int64_t opal_get_epow_status(__be64 *status); 852int64_t opal_get_epow_status(__be64 *status);
853int64_t opal_set_system_attention_led(uint8_t led_action); 853int64_t opal_set_system_attention_led(uint8_t led_action);
854int64_t opal_pci_next_error(uint64_t phb_id, uint64_t *first_frozen_pe, 854int64_t opal_pci_next_error(uint64_t phb_id, __be64 *first_frozen_pe,
855 uint16_t *pci_error_type, uint16_t *severity); 855 __be16 *pci_error_type, __be16 *severity);
856int64_t opal_pci_poll(uint64_t phb_id); 856int64_t opal_pci_poll(uint64_t phb_id);
857int64_t opal_return_cpu(void); 857int64_t opal_return_cpu(void);
858int64_t opal_reinit_cpus(uint64_t flags); 858int64_t opal_reinit_cpus(uint64_t flags);