Commit 9cd09cb7 authored by Keith Owens's avatar Keith Owens Committed by David Mosberger

[PATCH] ia64: mca.c cleanup - Delete dead variables and functions

parent 5376a577
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
* Avoid deadlock when using printk() for MCA and INIT records. * Avoid deadlock when using printk() for MCA and INIT records.
* Delete all record printing code, moved to salinfo_decode in user space. * Delete all record printing code, moved to salinfo_decode in user space.
* Mark variables and functions static where possible. * Mark variables and functions static where possible.
* Delete dead variables and functions.
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -73,14 +74,12 @@ ...@@ -73,14 +74,12 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hw_irq.h> #include <asm/hw_irq.h>
#undef MCA_PRT_XTRA_DATA
typedef struct ia64_fptr { typedef struct ia64_fptr {
unsigned long fp; unsigned long fp;
unsigned long gp; unsigned long gp;
} ia64_fptr_t; } ia64_fptr_t;
static ia64_mc_info_t ia64_mc_info; /* Used by mca_asm.S */
ia64_mca_sal_to_os_state_t ia64_sal_to_os_handoff_state; ia64_mca_sal_to_os_state_t ia64_sal_to_os_handoff_state;
ia64_mca_os_to_sal_state_t ia64_os_to_sal_handoff_state; ia64_mca_os_to_sal_state_t ia64_os_to_sal_handoff_state;
u64 ia64_mca_proc_state_dump[512]; u64 ia64_mca_proc_state_dump[512];
...@@ -88,8 +87,19 @@ u64 ia64_mca_stack[1024] __attribute__((aligned(16))); ...@@ -88,8 +87,19 @@ u64 ia64_mca_stack[1024] __attribute__((aligned(16)));
u64 ia64_mca_stackframe[32]; u64 ia64_mca_stackframe[32];
u64 ia64_mca_bspstore[1024]; u64 ia64_mca_bspstore[1024];
u64 ia64_init_stack[KERNEL_STACK_SIZE/8] __attribute__((aligned(16))); u64 ia64_init_stack[KERNEL_STACK_SIZE/8] __attribute__((aligned(16)));
u64 ia64_os_mca_recovery_successful;
u64 ia64_mca_serialize; u64 ia64_mca_serialize;
/* In mca_asm.S */
extern void ia64_monarch_init_handler (void);
extern void ia64_slave_init_handler (void);
static ia64_mc_info_t ia64_mc_info;
extern struct hw_interrupt_type irq_type_iosapic_level;
struct ia64_mca_tlb_info ia64_mca_tlb_list[NR_CPUS];
/* Forward declarations, the code is not in a nice order */
static void ia64_mca_wakeup_ipi_wait(void); static void ia64_mca_wakeup_ipi_wait(void);
static void ia64_mca_wakeup(int cpu); static void ia64_mca_wakeup(int cpu);
static void ia64_mca_wakeup_all(void); static void ia64_mca_wakeup_all(void);
...@@ -100,12 +110,7 @@ static irqreturn_t ia64_mca_cmc_int_handler(int,void *,struct pt_regs *); ...@@ -100,12 +110,7 @@ static irqreturn_t ia64_mca_cmc_int_handler(int,void *,struct pt_regs *);
static irqreturn_t ia64_mca_cpe_int_handler(int, void *, struct pt_regs *); static irqreturn_t ia64_mca_cpe_int_handler(int, void *, struct pt_regs *);
static irqreturn_t ia64_mca_cmc_int_caller(int,void *,struct pt_regs *); static irqreturn_t ia64_mca_cmc_int_caller(int,void *,struct pt_regs *);
static irqreturn_t ia64_mca_cpe_int_caller(int,void *,struct pt_regs *); static irqreturn_t ia64_mca_cpe_int_caller(int,void *,struct pt_regs *);
extern void ia64_monarch_init_handler (void);
extern void ia64_slave_init_handler (void);
static u64 ia64_log_get(int sal_info_type, u8 **buffer); static u64 ia64_log_get(int sal_info_type, u8 **buffer);
extern struct hw_interrupt_type irq_type_iosapic_level;
struct ia64_mca_tlb_info ia64_mca_tlb_list[NR_CPUS];
static struct irqaction cmci_irqaction = { static struct irqaction cmci_irqaction = {
.handler = ia64_mca_cmc_int_handler, .handler = ia64_mca_cmc_int_handler,
...@@ -206,11 +211,6 @@ ia64_mca_log_sal_error_record(int sal_info_type, int called_from_init) ...@@ -206,11 +211,6 @@ ia64_mca_log_sal_error_record(int sal_info_type, int called_from_init)
* platform dependent error handling * platform dependent error handling
*/ */
#ifndef PLATFORM_MCA_HANDLERS #ifndef PLATFORM_MCA_HANDLERS
static void
mca_handler_platform (void)
{
}
static irqreturn_t static irqreturn_t
ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs) ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs)
...@@ -411,23 +411,6 @@ init_handler_platform (pal_min_state_area_t *ms, ...@@ -411,23 +411,6 @@ init_handler_platform (pal_min_state_area_t *ms,
while (1); /* hang city if no debugger */ while (1); /* hang city if no debugger */
} }
/*
* ia64_mca_init_platform
*
* External entry for platform specific MCA initialization.
*
* Inputs
* None
*
* Outputs
* None
*/
static void
ia64_mca_init_platform (void)
{
}
/* /*
* ia64_mca_check_errors * ia64_mca_check_errors
* *
...@@ -627,9 +610,6 @@ ia64_mca_init(void) ...@@ -627,9 +610,6 @@ ia64_mca_init(void)
IA64_MCA_DEBUG("ia64_mca_init: begin\n"); IA64_MCA_DEBUG("ia64_mca_init: begin\n");
/* initialize recovery success indicator */
ia64_os_mca_recovery_successful = 0;
/* Clear the Rendez checkin flag for all cpus */ /* Clear the Rendez checkin flag for all cpus */
for(i = 0 ; i < NR_CPUS; i++) for(i = 0 ; i < NR_CPUS; i++)
ia64_mc_info.imi_rendez_checkin[i] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE; ia64_mc_info.imi_rendez_checkin[i] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
...@@ -697,7 +677,7 @@ ia64_mca_init(void) ...@@ -697,7 +677,7 @@ ia64_mca_init(void)
/* /*
* XXX - disable SAL checksum by setting size to 0, should be * XXX - disable SAL checksum by setting size to 0, should be
* IA64_INIT_HANDLER_SIZE * size of the actual init handler in mca_asm.S.
*/ */
ia64_mc_info.imi_monarch_init_handler = ia64_tpa(mon_init_ptr->fp); ia64_mc_info.imi_monarch_init_handler = ia64_tpa(mon_init_ptr->fp);
ia64_mc_info.imi_monarch_init_handler_size = 0; ia64_mc_info.imi_monarch_init_handler_size = 0;
...@@ -766,17 +746,7 @@ ia64_mca_init(void) ...@@ -766,17 +746,7 @@ ia64_mca_init(void)
ia64_log_init(SAL_INFO_TYPE_CMC); ia64_log_init(SAL_INFO_TYPE_CMC);
ia64_log_init(SAL_INFO_TYPE_CPE); ia64_log_init(SAL_INFO_TYPE_CPE);
#if defined(MCA_TEST)
mca_test();
#endif /* #if defined(MCA_TEST) */
printk(KERN_INFO "Mca related initialization done\n"); printk(KERN_INFO "Mca related initialization done\n");
/* commented out because this is done elsewhere */
#if 0
/* Do post-failure MCA error logging */
ia64_mca_check_errors();
#endif
} }
/* /*
......
...@@ -20,23 +20,8 @@ ...@@ -20,23 +20,8 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mca_asm.h> #include <asm/mca_asm.h>
/* These are the return codes from all the IA64_MCA specific interfaces */
typedef int ia64_mca_return_code_t;
enum {
IA64_MCA_SUCCESS = 0,
IA64_MCA_FAILURE = 1
};
#define IA64_MCA_RENDEZ_TIMEOUT (20 * 1000) /* value in milliseconds - 20 seconds */ #define IA64_MCA_RENDEZ_TIMEOUT (20 * 1000) /* value in milliseconds - 20 seconds */
#define IA64_CMC_INT_DISABLE 0
#define IA64_CMC_INT_ENABLE 1
typedef u32 int_vector_t;
typedef u64 millisec_t;
typedef union cmcv_reg_u { typedef union cmcv_reg_u {
u64 cmcv_regval; u64 cmcv_regval;
struct { struct {
...@@ -53,10 +38,6 @@ typedef union cmcv_reg_u { ...@@ -53,10 +38,6 @@ typedef union cmcv_reg_u {
#define cmcv_mask cmcv_reg_s.cmcr_mask #define cmcv_mask cmcv_reg_s.cmcr_mask
#define cmcv_vector cmcv_reg_s.cmcr_vector #define cmcv_vector cmcv_reg_s.cmcr_vector
#define IA64_MCA_UCMC_HANDLER_SIZE 0x10
#define IA64_INIT_HANDLER_SIZE 0x10
enum { enum {
IA64_MCA_RENDEZ_CHECKIN_NOTDONE = 0x0, IA64_MCA_RENDEZ_CHECKIN_NOTDONE = 0x0,
IA64_MCA_RENDEZ_CHECKIN_DONE = 0x1 IA64_MCA_RENDEZ_CHECKIN_DONE = 0x1
...@@ -85,16 +66,6 @@ typedef struct ia64_mc_info_s { ...@@ -85,16 +66,6 @@ typedef struct ia64_mc_info_s {
} ia64_mc_info_t; } ia64_mc_info_t;
/* Possible rendez states passed from SAL to OS during MCA
* handoff
*/
enum {
IA64_MCA_RENDEZ_NOT_RQD = 0x0,
IA64_MCA_RENDEZ_DONE_WITHOUT_INIT = 0x1,
IA64_MCA_RENDEZ_DONE_WITH_INIT = 0x2,
IA64_MCA_RENDEZ_FAILURE = -1
};
typedef struct ia64_mca_sal_to_os_state_s { typedef struct ia64_mca_sal_to_os_state_s {
u64 imsto_os_gp; /* GP of the os registered with the SAL */ u64 imsto_os_gp; /* GP of the os registered with the SAL */
u64 imsto_pal_proc; /* PAL_PROC entry point - physical addr */ u64 imsto_pal_proc; /* PAL_PROC entry point - physical addr */
...@@ -145,10 +116,6 @@ extern void ia64_slave_init_handler(void); ...@@ -145,10 +116,6 @@ extern void ia64_slave_init_handler(void);
extern void ia64_mca_cmc_vector_setup(void); extern void ia64_mca_cmc_vector_setup(void);
extern int ia64_mca_check_errors(void); extern int ia64_mca_check_errors(void);
#undef MCA_TEST
#undef IA64_MCA_DEBUG_INFO
#if defined(IA64_MCA_DEBUG_INFO) #if defined(IA64_MCA_DEBUG_INFO)
# define IA64_MCA_DEBUG(fmt...) printk(fmt) # define IA64_MCA_DEBUG(fmt...) printk(fmt)
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment