powerpc/powernv: Cleanup unused MCE definitions/declarations.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Mon, 24 Nov 2014 16:29:26 +0000 (21:59 +0530)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 2 Dec 2014 00:03:45 +0000 (11:03 +1100)
Cleanup OpalMCE_* definitions/declarations and other related code which
is not used anymore.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Acked-by: Benjamin Herrrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/opal.h
arch/powerpc/include/asm/paca.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/platforms/powernv/opal.c

index 60250e2d1f0d3deebe3683c78bede6fa215ad8cf..5cd8d2fddba94c6e5ef8b363686989e8fcb9df16 100644 (file)
@@ -288,62 +288,6 @@ enum OpalMessageType {
        OPAL_MSG_TYPE_MAX,
 };
 
-/* Machine check related definitions */
-enum OpalMCE_Version {
-       OpalMCE_V1 = 1,
-};
-
-enum OpalMCE_Severity {
-       OpalMCE_SEV_NO_ERROR = 0,
-       OpalMCE_SEV_WARNING = 1,
-       OpalMCE_SEV_ERROR_SYNC = 2,
-       OpalMCE_SEV_FATAL = 3,
-};
-
-enum OpalMCE_Disposition {
-       OpalMCE_DISPOSITION_RECOVERED = 0,
-       OpalMCE_DISPOSITION_NOT_RECOVERED = 1,
-};
-
-enum OpalMCE_Initiator {
-       OpalMCE_INITIATOR_UNKNOWN = 0,
-       OpalMCE_INITIATOR_CPU = 1,
-};
-
-enum OpalMCE_ErrorType {
-       OpalMCE_ERROR_TYPE_UNKNOWN = 0,
-       OpalMCE_ERROR_TYPE_UE = 1,
-       OpalMCE_ERROR_TYPE_SLB = 2,
-       OpalMCE_ERROR_TYPE_ERAT = 3,
-       OpalMCE_ERROR_TYPE_TLB = 4,
-};
-
-enum OpalMCE_UeErrorType {
-       OpalMCE_UE_ERROR_INDETERMINATE = 0,
-       OpalMCE_UE_ERROR_IFETCH = 1,
-       OpalMCE_UE_ERROR_PAGE_TABLE_WALK_IFETCH = 2,
-       OpalMCE_UE_ERROR_LOAD_STORE = 3,
-       OpalMCE_UE_ERROR_PAGE_TABLE_WALK_LOAD_STORE = 4,
-};
-
-enum OpalMCE_SlbErrorType {
-       OpalMCE_SLB_ERROR_INDETERMINATE = 0,
-       OpalMCE_SLB_ERROR_PARITY = 1,
-       OpalMCE_SLB_ERROR_MULTIHIT = 2,
-};
-
-enum OpalMCE_EratErrorType {
-       OpalMCE_ERAT_ERROR_INDETERMINATE = 0,
-       OpalMCE_ERAT_ERROR_PARITY = 1,
-       OpalMCE_ERAT_ERROR_MULTIHIT = 2,
-};
-
-enum OpalMCE_TlbErrorType {
-       OpalMCE_TLB_ERROR_INDETERMINATE = 0,
-       OpalMCE_TLB_ERROR_PARITY = 1,
-       OpalMCE_TLB_ERROR_MULTIHIT = 2,
-};
-
 enum OpalThreadStatus {
        OPAL_THREAD_INACTIVE = 0x0,
        OPAL_THREAD_STARTED = 0x1,
@@ -467,54 +411,6 @@ struct opal_ipmi_msg {
        uint8_t         data[];
 };
 
-struct opal_machine_check_event {
-       enum OpalMCE_Version    version:8;      /* 0x00 */
-       uint8_t                 in_use;         /* 0x01 */
-       enum OpalMCE_Severity   severity:8;     /* 0x02 */
-       enum OpalMCE_Initiator  initiator:8;    /* 0x03 */
-       enum OpalMCE_ErrorType  error_type:8;   /* 0x04 */
-       enum OpalMCE_Disposition disposition:8; /* 0x05 */
-       uint8_t                 reserved_1[2];  /* 0x06 */
-       uint64_t                gpr3;           /* 0x08 */
-       uint64_t                srr0;           /* 0x10 */
-       uint64_t                srr1;           /* 0x18 */
-       union {                                 /* 0x20 */
-               struct {
-                       enum OpalMCE_UeErrorType ue_error_type:8;
-                       uint8_t         effective_address_provided;
-                       uint8_t         physical_address_provided;
-                       uint8_t         reserved_1[5];
-                       uint64_t        effective_address;
-                       uint64_t        physical_address;
-                       uint8_t         reserved_2[8];
-               } ue_error;
-
-               struct {
-                       enum OpalMCE_SlbErrorType slb_error_type:8;
-                       uint8_t         effective_address_provided;
-                       uint8_t         reserved_1[6];
-                       uint64_t        effective_address;
-                       uint8_t         reserved_2[16];
-               } slb_error;
-
-               struct {
-                       enum OpalMCE_EratErrorType erat_error_type:8;
-                       uint8_t         effective_address_provided;
-                       uint8_t         reserved_1[6];
-                       uint64_t        effective_address;
-                       uint8_t         reserved_2[16];
-               } erat_error;
-
-               struct {
-                       enum OpalMCE_TlbErrorType tlb_error_type:8;
-                       uint8_t         effective_address_provided;
-                       uint8_t         reserved_1[6];
-                       uint64_t        effective_address;
-                       uint8_t         reserved_2[16];
-               } tlb_error;
-       } u;
-};
-
 /* FSP memory errors handling */
 enum OpalMemErr_Version {
        OpalMemErr_V1 = 1,
index a5139ea6910b03504ae60774b961ea1daaceae4a..24a386cbb928b008dde32a71ba244b3c0b6aecbb 100644 (file)
@@ -42,7 +42,6 @@ extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */
 #define get_slb_shadow()       (get_paca()->slb_shadow_ptr)
 
 struct task_struct;
-struct opal_machine_check_event;
 
 /*
  * Defines the layout of the paca.
@@ -153,12 +152,6 @@ struct paca_struct {
        u64 tm_scratch;                 /* TM scratch area for reclaim */
 #endif
 
-#ifdef CONFIG_PPC_POWERNV
-       /* Pointer to OPAL machine check event structure set by the
-        * early exception handler for use by high level C handler
-        */
-       struct opal_machine_check_event *opal_mc_evt;
-#endif
 #ifdef CONFIG_PPC_BOOK3S_64
        /* Exclusive emergency stack pointer for machine check exception. */
        void *mc_emergency_sp;
index 9d7dede2847cd0618a21e3ca99c4835041efe1df..c161ef3f28a1c3d417c6bee15e5b76024e43569f 100644 (file)
@@ -726,12 +726,5 @@ int main(void)
                                        arch.timing_last_enter.tv32.tbl));
 #endif
 
-#ifdef CONFIG_PPC_POWERNV
-       DEFINE(OPAL_MC_GPR3, offsetof(struct opal_machine_check_event, gpr3));
-       DEFINE(OPAL_MC_SRR0, offsetof(struct opal_machine_check_event, srr0));
-       DEFINE(OPAL_MC_SRR1, offsetof(struct opal_machine_check_event, srr1));
-       DEFINE(PACA_OPAL_MC_EVT, offsetof(struct paca_struct, opal_mc_evt));
-#endif
-
        return 0;
 }
index a1d45c161e24598405f0d4a3d469d7bdfe5f399f..ad62f4d6ce31c4830cc543da15ad344767325b7f 100644 (file)
@@ -1312,23 +1312,6 @@ hmi_exception_after_realmode:
        EXCEPTION_PROLOG_0(PACA_EXGEN)
        b       hmi_exception_hv
 
-#ifdef CONFIG_PPC_POWERNV
-_GLOBAL(opal_mc_secondary_handler)
-       HMT_MEDIUM_PPR_DISCARD
-       SET_SCRATCH0(r13)
-       GET_PACA(r13)
-       clrldi  r3,r3,2
-       tovirt(r3,r3)
-       std     r3,PACA_OPAL_MC_EVT(r13)
-       ld      r13,OPAL_MC_SRR0(r3)
-       mtspr   SPRN_SRR0,r13
-       ld      r13,OPAL_MC_SRR1(r3)
-       mtspr   SPRN_SRR1,r13
-       ld      r3,OPAL_MC_GPR3(r3)
-       GET_SCRATCH0(r13)
-       b       machine_check_pSeries
-#endif /* CONFIG_PPC_POWERNV */
-
 
 #define MACHINE_CHECK_HANDLER_WINDUP                   \
        /* Clear MSR_RI before setting SRR0 and SRR1. */\
index a1c37f9d60d2d5c326f29d21532b069f52c1e64c..cb0b6de79cd4f12ff50cc40508f9db3352f67429 100644 (file)
@@ -50,7 +50,6 @@ static int mc_recoverable_range_len;
 
 struct device_node *opal_node;
 static DEFINE_SPINLOCK(opal_write_lock);
-extern u64 opal_mc_secondary_handler[];
 static unsigned int *opal_irqs;
 static unsigned int opal_irq_count;
 static ATOMIC_NOTIFIER_HEAD(opal_notifier_head);